Skip to content

Commit f6b23a9

Browse files
authored
Merge pull request scipy#22100 from j-bowhay/spline_dep
2 parents acf6736 + 69547a4 commit f6b23a9

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

scipy/_lib/tests/test_public_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ def check_importable(module_name):
412412
('scipy.signal.ltisys', None),
413413
('scipy.signal.signaltools', None),
414414
('scipy.signal.spectral', None),
415+
('scipy.signal.spline', None),
415416
('scipy.signal.waveforms', None),
416417
('scipy.signal.wavelets', None),
417418
('scipy.signal.windows.windows', 'windows'),

scipy/signal/spline.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
# versions of SciPy. Use the `scipy.signal` namespace for importing the
33
# functions included below.
44

5-
import warnings
5+
from scipy._lib.deprecation import _sub_module_deprecation
66

7-
from . import _spline
87

98
__all__ = ['sepfir2d'] # noqa: F822
109

@@ -14,12 +13,6 @@ def __dir__():
1413

1514

1615
def __getattr__(name):
17-
if name not in __all__:
18-
raise AttributeError(
19-
f"scipy.signal.spline is deprecated and has no attribute {name}. "
20-
"Try looking in scipy.signal instead.")
21-
22-
warnings.warn(f"Please use `{name}` from the `scipy.signal` namespace, "
23-
"the `scipy.signal.spline` namespace is deprecated.",
24-
category=DeprecationWarning, stacklevel=2)
25-
return getattr(_spline, name)
16+
return _sub_module_deprecation(sub_package="signal", module="spline",
17+
private_modules=["_spline"], all=__all__,
18+
attribute=name)

0 commit comments

Comments
 (0)