summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-08-10 16:01:47 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-08-10 16:01:47 (GMT)
commitf22b62e26137e334e9a0beffd0de531955daf8ce (patch)
treea98d5fb518d5e09480cb70daea8bfdb62b4b908e /Lib/xmlrpc
parent319163244aa00dd17c021aea0775c94a13bc8c97 (diff)
downloadcpython-f22b62e26137e334e9a0beffd0de531955daf8ce.zip
cpython-f22b62e26137e334e9a0beffd0de531955daf8ce.tar.gz
cpython-f22b62e26137e334e9a0beffd0de531955daf8ce.tar.bz2
#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')
-rw-r--r--Lib/xmlrpc/server.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index 54e1726..78ca4e0 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 = '(...)'