DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
--- a/cubicweb/dataimport/stores.py Thu Apr 11 16:47:27 2019 +0200
+++ b/cubicweb/dataimport/stores.py Thu Apr 11 20:15:09 2019 +0200
@@ -188,7 +188,7 @@
self._system_source.add_info(cnx, entity, entity_source)
self._system_source.add_entity(cnx, entity)
kwargs = dict()
- if inspect.getargspec(self._add_relation).keywords:
+ if inspect.getfullargspec(self._add_relation).varkw:
kwargs['subjtype'] = entity.cw_etype
for rtype, targeteids in rels.items():
# targeteids may be a single eid or a list of eids
--- a/cubicweb/devtools/fill.py Thu Apr 11 16:47:27 2019 +0200
+++ b/cubicweb/devtools/fill.py Thu Apr 11 20:15:09 2019 +0200
@@ -258,7 +258,7 @@
for attrname, attrvalue in classdict.items():
if callable(attrvalue):
if attrname.startswith('generate_') and \
- len(inspect.getargspec(attrvalue).args) < 2:
+ len(inspect.getfullargspec(attrvalue).args) < 2:
raise TypeError('generate_xxx must accept at least 1 argument')
setattr(_ValueGenerator, attrname, attrvalue)
return type.__new__(mcs, name, bases, classdict)