diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/__init__.py | 2 | ||||
-rw-r--r-- | numpy/lib/tests/test_financial_expired.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 41c3dc42d..3e5277318 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -247,7 +247,7 @@ else: except KeyError: pass else: - warnings.warn(msg, RuntimeWarning) + warnings.warn(msg, DeprecationWarning, stacklevel=2) def _expired(*args, **kwds): raise RuntimeError(msg) diff --git a/numpy/lib/tests/test_financial_expired.py b/numpy/lib/tests/test_financial_expired.py index 66bb08026..70b0cd790 100644 --- a/numpy/lib/tests/test_financial_expired.py +++ b/numpy/lib/tests/test_financial_expired.py @@ -7,7 +7,7 @@ import numpy as np reason="requires python 3.7 or higher") def test_financial_expired(): match = 'NEP 32' - with pytest.warns(RuntimeWarning, match=match): + with pytest.warns(DeprecationWarning, match=match): func = np.fv with pytest.raises(RuntimeError, match=match): func(1, 2, 3) |