diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-09-02 10:06:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 10:06:54 -0500 |
commit | 3dbbfd8db5c21c603620bebc98e03bc84334f11c (patch) | |
tree | e29eb26cfbf72ee9b03aa15dd02671bf17e70301 /numpy/lib/utils.py | |
parent | 9164f23c19c049e28d4d4825a53bbb01aedabcfc (diff) | |
parent | 68ea0c792db6bac435752e45d8681f7f1283453d (diff) | |
download | numpy-3dbbfd8db5c21c603620bebc98e03bc84334f11c.tar.gz |
Merge pull request #7148 from seberg/stacklevel+tests
ENH,TST: Bump stacklevel and add tests for warnings
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index a2191468f..133704d13 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -96,7 +96,7 @@ class _Deprecate(object): def newfunc(*args,**kwds): """`arrayrange` is deprecated, use `arange` instead!""" - warnings.warn(depdoc, DeprecationWarning) + warnings.warn(depdoc, DeprecationWarning, stacklevel=2) return func(*args, **kwds) newfunc = _set_function_name(newfunc, old_name) @@ -152,7 +152,7 @@ def deprecate(*args, **kwargs): >>> olduint(6) /usr/lib/python2.5/site-packages/numpy/lib/utils.py:114: DeprecationWarning: uint32 is deprecated - warnings.warn(str1, DeprecationWarning) + warnings.warn(str1, DeprecationWarning, stacklevel=2) 6 """ @@ -1016,7 +1016,7 @@ class SafeEval(object): def __init__(self): # 2014-10-15, 1.10 warnings.warn("SafeEval is deprecated in 1.10 and will be removed.", - DeprecationWarning) + DeprecationWarning, stacklevel=2) def visit(self, node): cls = node.__class__ |