diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-08-10 12:01:47 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-08-10 12:01:47 -0400 |
commit | f22b62e26137e334e9a0beffd0de531955daf8ce (patch) | |
tree | a98d5fb518d5e09480cb70daea8bfdb62b4b908e /Lib/xmlrpc/server.py | |
parent | 319163244aa00dd17c021aea0775c94a13bc8c97 (diff) | |
download | cpython-git-f22b62e26137e334e9a0beffd0de531955daf8ce.tar.gz |
#8112: Update the documenting xmlrpc server to use getfullargspec.
Before this patch it would raise an error when trying to display
documentation for a method that used annotations.
Patch by Claudiu Popa.
Diffstat (limited to 'Lib/xmlrpc/server.py')
-rw-r--r-- | Lib/xmlrpc/server.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py index 54e172670b..78ca4e0a4a 100644 --- a/Lib/xmlrpc/server.py +++ b/Lib/xmlrpc/server.py @@ -756,20 +756,23 @@ class ServerHTMLDoc(pydoc.HTMLDoc): self.escape(anchor), self.escape(name)) if inspect.ismethod(object): - args, varargs, varkw, defaults = inspect.getargspec(object) + args = inspect.getfullargspec(object) # exclude the argument bound to the instance, it will be # confusing to the non-Python user argspec = inspect.formatargspec ( - args[1:], - varargs, - varkw, - defaults, + args.args[1:], + args.varargs, + args.varkw, + args.defaults, + annotations=args.annotations, formatvalue=self.formatvalue ) elif inspect.isfunction(object): - args, varargs, varkw, defaults = inspect.getargspec(object) + args = inspect.getfullargspec(object) argspec = inspect.formatargspec( - args, varargs, varkw, defaults, formatvalue=self.formatvalue) + args.args, args.varargs, args.varkw, args.defaults, + annotations=args.annotations, + formatvalue=self.formatvalue) else: argspec = '(...)' |