Commit c582df3d authored by Laurent Peuch's avatar Laurent Peuch
Browse files

DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use...

DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
parent 82bf85157b53
......@@ -188,7 +188,7 @@ class NoHookRQLObjectStore(RQLObjectStore):
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
......@@ -258,7 +258,7 @@ class autoextend(type):
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment