diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2020-09-12 14:37:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-12 14:37:36 -0600 |
| commit | 953c0827c6f31b574a6792f815ebd47def91df97 (patch) | |
| tree | efbfea87c22eec67489ae8f548489d631f0afaf7 /numpy | |
| parent | 8adeca227a39640b0ad4db38ca34a77a0bb50c8f (diff) | |
| parent | 295c8af73969d8101af5e91c9c45b7adbadee077 (diff) | |
| download | numpy-953c0827c6f31b574a6792f815ebd47def91df97.tar.gz | |
Merge pull request #17285 from seberg/tune-down-financial-warning
DEP: Change the financial name access warning to DeprecationWarning
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) |
