13
13
_NoValue = object ()
14
14
15
15
def _sub_module_deprecation (* , sub_package , module , private_modules , all ,
16
- attribute , correct_module = None ):
16
+ attribute , correct_module = None , dep_version = "1.16.0" ):
17
17
"""Helper function for deprecating modules that are public but were
18
18
intended to be private.
19
19
@@ -33,6 +33,8 @@ def _sub_module_deprecation(*, sub_package, module, private_modules, all,
33
33
correct_module : str, optional
34
34
Module in `sub_package` that `attribute` should be imported from.
35
35
Default is that `attribute` should be imported from ``scipy.sub_package``.
36
+ dep_version : str, optional
37
+ Version in which deprecated attributes will be removed.
36
38
"""
37
39
if correct_module is not None :
38
40
correct_import = f"scipy.{ sub_package } .{ correct_module } "
@@ -59,7 +61,7 @@ def _sub_module_deprecation(*, sub_package, module, private_modules, all,
59
61
f"`scipy.{ sub_package } .{ module } .{ attribute } ` is deprecated along with "
60
62
f"the `scipy.{ sub_package } .{ module } ` namespace. "
61
63
f"`scipy.{ sub_package } .{ module } .{ attribute } ` will be removed "
62
- f"in SciPy 1.14.0 , and the `scipy.{ sub_package } .{ module } ` namespace "
64
+ f"in SciPy { dep_version } , and the `scipy.{ sub_package } .{ module } ` namespace "
63
65
f"will be removed in SciPy 2.0.0."
64
66
)
65
67
0 commit comments