diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-22 20:09:44 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-22 20:09:44 (GMT) |
commit | c8386f78fdf68fef4d9b87e7147b6d288213b8e4 (patch) | |
tree | 209df58f59343c4673c57c7c0537fcbbd3052c53 /Lib/inspect.py | |
parent | 46dbb7d1032c19163f37785509b8f5b3004416e8 (diff) | |
download | cpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.zip cpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.tar.gz cpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.tar.bz2 |
Issue 20438: Adjust stacklevel of inspect.getargspec() warning.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 48354f6..3debc24 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1034,7 +1034,8 @@ def getargspec(func): if the func has either annotations or keyword arguments. """ warnings.warn("inspect.getargspec() is deprecated, " - "use inspect.signature() instead", DeprecationWarning) + "use inspect.signature() instead", DeprecationWarning, + stacklevel=2) args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \ getfullargspec(func) if kwonlyargs or ann: |