Merge "Fix inspect.getargspec() deprecation warning"

This commit is contained in:
Zuul 2023-04-18 12:48:06 +00:00 committed by Gerrit Code Review
commit 4be14e28ef
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class Commands(object):
def execute(self):
exec_method = getattr(self, CONF.action.name)
args = inspect.getargspec(exec_method)
args = inspect.getfullargspec(exec_method)
args.args.remove('self')
kwargs = {}
for arg in args.args:

View File

@ -175,7 +175,7 @@ class MethodInspector(object):
@cached_property
def argspec(self):
return inspect.getargspec(self._func)
return inspect.getfullargspec(self._func)
def __str__(self):
optionals = ["[{0}=<{0}>]".format(k) for k, v in self.optional_args]