diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2016-01-23 15:58:58 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2016-09-02 16:39:17 +0200 |
commit | 7884a8c9f5f5c6657413dbeaa59ad969280d38ea (patch) | |
tree | 91b55f723315291bf2605bb42aef809a65ff1d85 /numpy/lib/utils.py | |
parent | 9164f23c19c049e28d4d4825a53bbb01aedabcfc (diff) | |
download | numpy-7884a8c9f5f5c6657413dbeaa59ad969280d38ea.tar.gz |
ENH: Add stacklevel to all (or almost all) our function calls
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__ |