[python3] use inspect.getfullargspec instead of inspect.getargspec 3.26
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 03 May 2018 14:05:26 +0200
branch3.26
changeset 12319 3ee1db91fb00
parent 12296 23bc9f385645
child 12320 d46753a9a2a5
[python3] use inspect.getfullargspec instead of inspect.getargspec The latter is now deprecated
cubicweb/utils.py
--- a/cubicweb/utils.py	Thu Oct 12 15:22:00 2017 +0200
+++ b/cubicweb/utils.py	Thu May 03 14:05:26 2018 +0200
@@ -26,8 +26,13 @@
 import re
 import json
 
+from six import PY3
+
 from operator import itemgetter
-from inspect import getargspec
+if PY3:
+    from inspect import getfullargspec as getargspec
+else:
+    from inspect import getargspec
 from itertools import repeat
 from uuid import uuid4
 from warnings import warn