summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-09-17 07:51:10 +0200
committerGeorg Brandl <georg@python.org>2013-09-17 07:51:10 +0200
commit22caa022fa5d7c66bf1dfcf7ce93245226af08c8 (patch)
treef33fe5a7f9411621fa761a90f7377691fec64ecf /sphinx/util/inspect.py
parent4f10b03d228f6453d4ba7cc27eb5a1236e710394 (diff)
downloadsphinx-22caa022fa5d7c66bf1dfcf7ce93245226af08c8.tar.gz
Fix new getargspec implementation for 3.x.
Diffstat (limited to 'sphinx/util/inspect.py')
-rw-r--r--sphinx/util/inspect.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 0212eb7e..4c337ef9 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -27,11 +27,11 @@ if sys.version_info >= (3, 0):
func = func.__func__
if type(func) is partial:
orig_func = func.func
- argspec = inspect.getfullargspec(orig_func)
+ argspec = getargspec(orig_func)
args = list(argspec[0])
- defaults = list(argspec[3])
+ defaults = list(argspec[3] or ())
kwoargs = list(argspec[4])
- kwodefs = dict(argspec[5])
+ kwodefs = dict(argspec[5] or {})
if func.args:
args = args[len(func.args):]
for arg in func.keywords or ():