Commit c8386f78 authored by Yury Selivanov's avatar Yury Selivanov

Issue 20438: Adjust stacklevel of inspect.getargspec() warning.

parent 46dbb7d1
...@@ -1034,7 +1034,8 @@ def getargspec(func): ...@@ -1034,7 +1034,8 @@ def getargspec(func):
if the func has either annotations or keyword arguments. if the func has either annotations or keyword arguments.
""" """
warnings.warn("inspect.getargspec() is deprecated, " 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 = \ args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \
getfullargspec(func) getfullargspec(func)
if kwonlyargs or ann: if kwonlyargs or ann:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment