changeset: 97158:ad4c1bfe257f user: Berker Peksag date: Fri Jul 31 04:11:29 2015 +0300 files: Doc/library/inspect.rst Lib/inspect.py Lib/test/test_inspect.py description: Issue #13248: Delete remaining references of inspect.getargspec(). Noticed by Yaroslav Halchenko. diff -r 0879f2c53289 -r ad4c1bfe257f Doc/library/inspect.rst --- a/Doc/library/inspect.rst Fri Jul 31 09:02:09 2015 +1200 +++ b/Doc/library/inspect.rst Fri Jul 31 04:11:29 2015 +0300 @@ -805,8 +805,6 @@ from kwonlyargs to defaults. *annotations* is a dictionary mapping argument names to annotations. - The first four items in the tuple correspond to :func:`getargspec`. - .. versionchanged:: 3.4 This function is now based on :func:`signature`, but still ignores ``__wrapped__`` attributes and includes the already bound first @@ -835,7 +833,7 @@ .. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]]) Format a pretty argument spec from the values returned by - :func:`getargspec` or :func:`getfullargspec`. + :func:`getfullargspec`. The first seven arguments are (``args``, ``varargs``, ``varkw``, ``defaults``, ``kwonlyargs``, ``kwonlydefaults``, ``annotations``). diff -r 0879f2c53289 -r ad4c1bfe257f Lib/inspect.py --- a/Lib/inspect.py Fri Jul 31 09:02:09 2015 +1200 +++ b/Lib/inspect.py Fri Jul 31 04:11:29 2015 +0300 @@ -16,7 +16,7 @@ getmodule() - determine the module that an object came from getclasstree() - arrange classes so as to represent their hierarchy - getargspec(), getargvalues(), getcallargs() - get info about function arguments + getargvalues(), getcallargs() - get info about function arguments getfullargspec() - same, with support for Python 3 features formatargspec(), formatargvalues() - format an argument spec getouterframes(), getinnerframes() - get info about frames @@ -1018,8 +1018,6 @@ 'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults. '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. """ @@ -1130,8 +1128,7 @@ formatvalue=lambda value: '=' + repr(value), formatreturns=lambda text: ' -> ' + text, formatannotation=formatannotation): - """Format an argument spec from the values returned by getargspec - or getfullargspec. + """Format an argument spec from the values returned by getfullargspec. The first seven arguments are (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations). The other five arguments diff -r 0879f2c53289 -r ad4c1bfe257f Lib/test/test_inspect.py --- a/Lib/test/test_inspect.py Fri Jul 31 09:02:09 2015 +1200 +++ b/Lib/test/test_inspect.py Fri Jul 31 04:11:29 2015 +0300 @@ -38,7 +38,7 @@ # ismodule, isclass, ismethod, isfunction, istraceback, isframe, iscode, # isbuiltin, isroutine, isgenerator, isgeneratorfunction, getmembers, # getdoc, getfile, getmodule, getsourcefile, getcomments, getsource, -# getclasstree, getargspec, getargvalues, formatargspec, formatargvalues, +# getclasstree, getargvalues, formatargspec, formatargvalues, # currentframe, stack, trace, isdatadescriptor # NOTE: There are some additional tests relating to interaction with