Replace deprecated inspect.getargspec
inspect.getargspec was deprecated since Python 3.0 and inspect.getfullargspec is its replacement with correct handling of function annotations and keyword-only parameters[1]. [1] https://docs.python.org/3/library/inspect.html#inspect.getargspec Change-Id: I2411be23a83aef9550d58ead51b4caf2f8c5409f
This commit is contained in:
parent
df72deeb9f
commit
2216af7834
|
@ -323,7 +323,7 @@ class Profile(object):
|
|||
|
||||
ctx_dict = self.properties.get('context', {})
|
||||
if ctx_dict:
|
||||
argspec = inspect.getargspec(context.RequestContext.__init__)
|
||||
argspec = inspect.getfullargspec(context.RequestContext.__init__)
|
||||
valid_keys = argspec.args
|
||||
bad_keys = [k for k in ctx_dict if k not in valid_keys]
|
||||
if bad_keys:
|
||||
|
|
Loading…
Reference in New Issue