diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-22 11:38:38 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-22 11:38:38 -0400 |
commit | 3cfec2e2fcab9f39121cec362b78ac235093ca1c (patch) | |
tree | 5e95f36871c6ff1557a76b968210de346de9213e /Lib/inspect.py | |
parent | 8d006e75e02dadf4af4d69cc6e0d846b0e29e154 (diff) | |
download | cpython-git-3cfec2e2fcab9f39121cec362b78ac235093ca1c.tar.gz |
Issue 20438: Deprecate inspect.getargspec() and friends.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index cbf38e7d18..48354f6d61 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1033,7 +1033,8 @@ def getargspec(func): and keyword arguments are supported. getargspec() will raise ValueError if the func has either annotations or keyword arguments. """ - + warnings.warn("inspect.getargspec() is deprecated, " + "use inspect.signature() instead", DeprecationWarning) args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \ getfullargspec(func) if kwonlyargs or ann: @@ -1057,6 +1058,8 @@ def getfullargspec(func): 'annotations' is a dictionary mapping argument names to annotations. The first four items in the tuple correspond to getargspec(). + + This function is deprecated, use inspect.signature() instead. """ try: |