Skip to content

Commit cb73190

Browse files
committed
optimize+sparse: Make warnings inherit from UserWarning.
1 parent 6639e5d commit cb73190

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

scipy-stubs/optimize/optimize.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def zeros(
3939
class OptimizeResult: ...
4040

4141
@deprecated("will be removed in SciPy v2.0.0")
42-
class OptimizeWarning: ...
42+
class OptimizeWarning(UserWarning): ...
4343

4444
@deprecated("will be removed in SciPy v2.0.0")
4545
def approx_fprime(

scipy-stubs/sparse/base.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ __all__ = [
2222
MAXPRINT: Final[int]
2323

2424
@deprecated("will be removed in SciPy v2.0.0")
25-
class SparseWarning: ...
25+
class SparseWarning(UserWarning): ...
2626

2727
@deprecated("will be removed in SciPy v2.0.0")
28-
class SparseFormatWarning: ...
28+
class SparseFormatWarning(UserWarning): ...
2929

3030
@deprecated("will be removed in SciPy v2.0.0")
31-
class SparseEfficiencyWarning: ...
31+
class SparseEfficiencyWarning(UserWarning): ...
3232

3333
@deprecated("will be removed in SciPy v2.0.0")
3434
class spmatrix:

scipy-stubs/sparse/compressed.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ __all__ = [
3131
]
3232

3333
@deprecated("will be removed in SciPy v2.0.0")
34-
class SparseEfficiencyWarning: ...
34+
class SparseEfficiencyWarning(UserWarning): ...
3535

3636
@deprecated("will be removed in SciPy v2.0.0")
3737
class IndexMixin:

scipy-stubs/sparse/coo.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ __all__ = [
2525
]
2626

2727
@deprecated("will be removed in SciPy v2.0.0")
28-
class SparseEfficiencyWarning: ...
28+
class SparseEfficiencyWarning(UserWarning): ...
2929

3030
@deprecated("will be removed in SciPy v2.0.0")
3131
class spmatrix:

scipy-stubs/sparse/linalg/dsolve.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ __all__ = [
1818
test: ModuleType
1919

2020
@deprecated("will be removed in SciPy v2.0.0")
21-
class MatrixRankWarning: ...
21+
class MatrixRankWarning(UserWarning): ...
2222

2323
@final
2424
@deprecated("will be removed in SciPy v2.0.0")

0 commit comments

Comments
 (0)