Skip to content

Commit 0a99f58

Browse files
authored
Merge pull request #79 from pavyamsiri/deprecated-public-modules-p2
Final pass over the deprecated public modules
2 parents e5f1226 + 2a14f1c commit 0a99f58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1775
-242
lines changed

scipy-stubs/constants/codata.pyi

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
2-
from ._codata import ConstantWarning, c, find, k, physical_constants, precision, unit, value
2+
from typing_extensions import deprecated
3+
4+
# Constants can't be tagged with `deprecated` so no point to stub these out again.
5+
from ._codata import c, k, physical_constants
36

47
__all__ = ["ConstantWarning", "c", "find", "k", "physical_constants", "precision", "unit", "value"]
8+
9+
@deprecated("will be removed in SciPy v2.0.0")
10+
class ConstantWarning(DeprecationWarning): ...
11+
12+
@deprecated("will be removed in SciPy v2.0.0")
13+
def find(sub: str | None = ..., disp: bool = ...) -> object: ...
14+
@deprecated("will be removed in SciPy v2.0.0")
15+
def precision(key: str) -> float: ...
16+
@deprecated("will be removed in SciPy v2.0.0")
17+
def unit(key: str) -> object: ...
18+
@deprecated("will be removed in SciPy v2.0.0")
19+
def value(key: str) -> float: ...

scipy-stubs/constants/constants.pyi

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
2+
3+
from typing_extensions import deprecated
4+
25
from ._constants import (
36
N_A,
47
Avogadro,
@@ -36,7 +39,6 @@ from ._constants import (
3639
calorie_th,
3740
carat,
3841
centi,
39-
convert_temperature,
4042
day,
4143
deci,
4244
degree,
@@ -87,7 +89,6 @@ from ._constants import (
8789
kilogram_force,
8890
kmh,
8991
knot,
90-
lambda2nu,
9192
lb,
9293
lbf,
9394
light_year,
@@ -114,7 +115,6 @@ from ._constants import (
114115
nano,
115116
nautical_mile,
116117
neutron_mass,
117-
nu2lambda,
118118
ounce,
119119
oz,
120120
parsec,
@@ -312,3 +312,14 @@ __all__ = [
312312
"zero_Celsius",
313313
"zetta",
314314
]
315+
316+
@deprecated("will be removed in SciPy v2.0.0")
317+
def convert_temperature(
318+
val: object,
319+
old_scale: object,
320+
new_scale: object,
321+
) -> object: ...
322+
@deprecated("will be removed in SciPy v2.0.0")
323+
def lambda2nu(lambda_: object) -> object: ...
324+
@deprecated("will be removed in SciPy v2.0.0")
325+
def nu2lambda(nu: object) -> object: ...

scipy-stubs/integrate/dop.pyi

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
2-
from typing_extensions import Never, deprecated
32

4-
__all__: list[Never] = []
5-
6-
@deprecated("will be removed in SciPy 2.0.0.")
7-
def __dir__() -> list[Never]: ...
8-
@deprecated("will be removed in SciPy 2.0.0.")
9-
def __getattr__(name: str) -> Never: ... # pyright: ignore[reportIncompleteStub]
3+
__all__: list[str] = []

scipy-stubs/integrate/odepack.pyi

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
22
from typing_extensions import deprecated
33

4-
from ._odepack_py import odeint
5-
64
__all__ = ["ODEintWarning", "odeint"]
75

86
@deprecated("will be removed in SciPy 2.0.0.")
97
class ODEintWarning(Warning): ...
8+
9+
@deprecated("will be removed in SciPy v2.0.0")
10+
def odeint(
11+
func: object,
12+
y0: object,
13+
t: object,
14+
args: object = ...,
15+
Dfun: object = ...,
16+
col_deriv: object = ...,
17+
full_output: object = ...,
18+
ml: object = ...,
19+
mu: object = ...,
20+
rtol: object = ...,
21+
atol: object = ...,
22+
tcrit: object = ...,
23+
h0: object = ...,
24+
hmax: object = ...,
25+
hmin: object = ...,
26+
ixpr: object = ...,
27+
mxstep: object = ...,
28+
mxhnil: object = ...,
29+
mxordn: object = ...,
30+
mxords: object = ...,
31+
printmessg: object = ...,
32+
tfirst: object = ...,
33+
) -> object: ...

scipy-stubs/integrate/quadpack.pyi

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,58 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
22
from typing_extensions import deprecated
33

4-
from ._quadpack_py import dblquad, nquad, quad, tplquad
5-
64
__all__ = ["IntegrationWarning", "dblquad", "nquad", "quad", "tplquad"]
75

86
@deprecated("will be removed in SciPy v2.0.0")
97
class IntegrationWarning(UserWarning): ...
8+
9+
@deprecated("will be removed in SciPy v2.0.0")
10+
def dblquad(
11+
func: object,
12+
a: object,
13+
b: object,
14+
gfun: object,
15+
hfun: object,
16+
args: object = ...,
17+
epsabs: object = ...,
18+
epsrel: object = ...,
19+
) -> object: ...
20+
@deprecated("will be removed in SciPy v2.0.0")
21+
def nquad(
22+
func: object,
23+
ranges: object,
24+
args: object = ...,
25+
opts: object = ...,
26+
full_output: object = ...,
27+
) -> object: ...
28+
@deprecated("will be removed in SciPy v2.0.0")
29+
def quad(
30+
func: object,
31+
a: object,
32+
b: object,
33+
args: object = ...,
34+
full_output: object = ...,
35+
epsabs: object = ...,
36+
epsrel: object = ...,
37+
limit: object = ...,
38+
points: object = ...,
39+
weight: object = ...,
40+
wvar: object = ...,
41+
wopts: object = ...,
42+
maxp1: object = ...,
43+
limlst: object = ...,
44+
complex_func: object = ...,
45+
) -> object: ...
46+
@deprecated("will be removed in SciPy v2.0.0")
47+
def tplquad(
48+
func: object,
49+
a: object,
50+
b: object,
51+
gfun: object,
52+
hfun: object,
53+
qfun: object,
54+
rfun: object,
55+
args: object = ...,
56+
epsabs: object = ...,
57+
epsrel: object = ...,
58+
) -> object: ...

scipy-stubs/integrate/vode.pyi

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
2-
from typing_extensions import Never, deprecated
32

4-
__all__: list[Never] = []
5-
6-
@deprecated("will be removed in SciPy 2.0.0.")
7-
def __dir__() -> list[Never]: ...
8-
@deprecated("will be removed in SciPy 2.0.0.")
9-
def __getattr__(name: str) -> Never: ... # pyright: ignore[reportIncompleteStub]
3+
__all__: list[str] = []

scipy-stubs/linalg/basic.pyi

Lines changed: 117 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
# This file is not meant for public use and will be removed in SciPy v2.0.0.
22

3-
from ._basic import (
4-
det,
5-
inv,
6-
lstsq,
7-
matmul_toeplitz,
8-
matrix_balance,
9-
pinv,
10-
pinvh,
11-
solve,
12-
solve_banded,
13-
solve_circulant,
14-
solve_toeplitz,
15-
solve_triangular,
16-
solveh_banded,
17-
)
18-
from .lapack import get_lapack_funcs
19-
from .misc import LinAlgError, LinAlgWarning
3+
from typing_extensions import deprecated
204

215
__all__ = [
226
"LinAlgError",
@@ -36,3 +20,119 @@ __all__ = [
3620
"solve_triangular",
3721
"solveh_banded",
3822
]
23+
24+
@deprecated("will be removed in SciPy v2.0.0")
25+
class LinAlgError(Exception): ...
26+
27+
@deprecated("will be removed in SciPy v2.0.0")
28+
class LinAlgWarning(RuntimeWarning): ...
29+
30+
@deprecated("will be removed in SciPy v2.0.0")
31+
def get_lapack_funcs(
32+
names: object,
33+
arrays: object = ...,
34+
dtype: object = ...,
35+
ilp64: object = ...,
36+
) -> object: ...
37+
@deprecated("will be removed in SciPy v2.0.0")
38+
def solve(
39+
a: object,
40+
b: object,
41+
lower: object = ...,
42+
overwrite_a: object = ...,
43+
overwrite_b: object = ...,
44+
check_finite: object = ...,
45+
assume_a: object = ...,
46+
transposed: object = ...,
47+
) -> object: ...
48+
@deprecated("will be removed in SciPy v2.0.0")
49+
def solve_triangular(
50+
a: object,
51+
b: object,
52+
trans: object = ...,
53+
lower: object = ...,
54+
unit_diagonal: object = ...,
55+
overwrite_b: object = ...,
56+
check_finite: object = ...,
57+
) -> object: ...
58+
@deprecated("will be removed in SciPy v2.0.0")
59+
def solve_banded(
60+
l_and_u: object,
61+
ab: object,
62+
b: object,
63+
overwrite_ab: object = ...,
64+
overwrite_b: object = ...,
65+
check_finite: object = ...,
66+
) -> object: ...
67+
@deprecated("will be removed in SciPy v2.0.0")
68+
def solveh_banded(
69+
ab: object,
70+
b: object,
71+
overwrite_ab: object = ...,
72+
overwrite_b: object = ...,
73+
lower: object = ...,
74+
check_finite: object = ...,
75+
) -> object: ...
76+
@deprecated("will be removed in SciPy v2.0.0")
77+
def solve_toeplitz(
78+
c_or_cr: object | tuple[object, object],
79+
b: object,
80+
check_finite: object = ...,
81+
) -> object: ...
82+
@deprecated("will be removed in SciPy v2.0.0")
83+
def solve_circulant(
84+
c: object,
85+
b: object,
86+
singular: object = ...,
87+
tol: object = ...,
88+
caxis: object = ...,
89+
baxis: object = ...,
90+
outaxis: object = ...,
91+
) -> object: ...
92+
@deprecated("will be removed in SciPy v2.0.0")
93+
def inv(a: object, overwrite_a: object = ..., check_finite: object = ...) -> object: ...
94+
@deprecated("will be removed in SciPy v2.0.0")
95+
def det(a: object, overwrite_a: object = ..., check_finite: object = ...) -> object: ...
96+
@deprecated("will be removed in SciPy v2.0.0")
97+
def lstsq(
98+
a: object,
99+
b: object,
100+
cond: object = ...,
101+
overwrite_a: object = ...,
102+
overwrite_b: object = ...,
103+
check_finite: object = ...,
104+
lapack_driver: object = ...,
105+
) -> object: ...
106+
@deprecated("will be removed in SciPy v2.0.0")
107+
def pinv(
108+
a: object,
109+
*,
110+
atol: object = ...,
111+
rtol: object = ...,
112+
return_rank: object = ...,
113+
check_finite: object = ...,
114+
) -> object: ...
115+
@deprecated("will be removed in SciPy v2.0.0")
116+
def pinvh(
117+
a: object,
118+
atol: object = ...,
119+
rtol: object = ...,
120+
lower: object = ...,
121+
return_rank: object = ...,
122+
check_finite: object = ...,
123+
) -> object: ...
124+
@deprecated("will be removed in SciPy v2.0.0")
125+
def matrix_balance(
126+
A: object,
127+
permute: object = ...,
128+
scale: object = ...,
129+
separate: object = ...,
130+
overwrite_a: object = ...,
131+
) -> object: ...
132+
@deprecated("will be removed in SciPy v2.0.0")
133+
def matmul_toeplitz(
134+
c_or_cr: object | tuple[object, object],
135+
x: object,
136+
check_finite: object = ...,
137+
workers: object = ...,
138+
) -> object: ...

0 commit comments

Comments
 (0)