Skip to content

Commit 25a089e

Browse files
committed
Diffraction_object deprecation warning
1 parent 2559946 commit 25a089e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/diffpy/utils/scattering_objects/diffraction_objects.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import datetime
22
from copy import deepcopy
3-
3+
import warnings
44
import numpy as np
55

66
from diffpy.utils.tools import get_package_info
@@ -18,6 +18,18 @@
1818

1919

2020
class Diffraction_object:
21+
"""FIXME: Add class docstring.
22+
23+
.. deprecated:: 3.5.1
24+
`Diffraction_object` will be removed in diffpy.utils 3.6.0, it is replaced by
25+
`DiffractionObject` to follow the class naming convention.
26+
"""
27+
warnings.warn(
28+
"Diffraction_object` will be removed in diffpy.utils 3.6.0, it is replaced by "
29+
"DiffractionObject` to follow the class naming convention.",
30+
DeprecationWarning,
31+
stacklevel=2,
32+
)
2133
def __init__(self, name="", wavelength=None):
2234
self.name = name
2335
self.wavelength = wavelength

0 commit comments

Comments
 (0)