diff options
author | likui <likui@yovole.com> | 2021-05-10 18:10:56 +0800 |
---|---|---|
committer | likui <likui@yovole.com> | 2021-05-12 10:50:52 +0800 |
commit | 150b9182512fa0a4f157586e040a7f67c1851005 (patch) | |
tree | d39766c26fb64fd1eb71716fe5e360ae353d874c /nova/test.py | |
parent | 7953c0197d1a4466cb5b78070d47626c92f9db6e (diff) | |
download | nova-150b9182512fa0a4f157586e040a7f67c1851005.tar.gz |
Replace getargspec with getfullargspec
inspect.getargspec() is deprecated since py3
[1] https://docs.python.org/3/library/inspect.html#inspect.getargspec
Change-Id: I6fbdf942dd192351e135430997c15ea92e7fb8af
Diffstat (limited to 'nova/test.py')
-rw-r--r-- | nova/test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/test.py b/nova/test.py index 1bcffd44ba..baa19589cf 100644 --- a/nova/test.py +++ b/nova/test.py @@ -635,8 +635,8 @@ class TestCase(base.BaseTestCase): for name in sorted(implmethods.keys()): # NOTE(stephenfin): We ignore type annotations - baseargs = utils.getargspec(basemethods[name])[:-1] - implargs = utils.getargspec(implmethods[name])[:-1] + baseargs = inspect.getfullargspec(basemethods[name])[:-1] + implargs = inspect.getfullargspec(implmethods[name])[:-1] self.assertEqual(baseargs, implargs, "%s args don't match base class %s" % @@ -709,7 +709,7 @@ class SubclassSignatureTestCase(testtools.TestCase, metaclass=abc.ABCMeta): # instead. method = getattr(method, '__wrapped__') - argspecs[name] = utils.getargspec(method) + argspecs[name] = inspect.getfullargspec(method) return argspecs |