Merge "Fix inspect module deprecation warning"

This commit is contained in:
Zuul 2020-07-14 19:48:02 +00:00 committed by Gerrit Code Review
commit 522ab45d51
2 changed files with 3 additions and 3 deletions

View File

@ -812,8 +812,8 @@ class TestCase(base.BaseTestCase):
def _ensure_interface(self, interface, implementation): def _ensure_interface(self, interface, implementation):
for name in interface.__abstractmethods__: for name in interface.__abstractmethods__:
in_arginfo = inspect.getargspec(getattr(interface, name)) in_arginfo = inspect.getfullargspec(getattr(interface, name))
im_arginfo = inspect.getargspec(getattr(implementation, name)) im_arginfo = inspect.getfullargspec(getattr(implementation, name))
self.assertEqual( self.assertEqual(
in_arginfo, im_arginfo, in_arginfo, im_arginfo,

View File

@ -190,7 +190,7 @@ def validate_uuid(*check):
""" """
def inner(f): def inner(f):
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
arg_spec = inspect.getargspec(f).args arg_spec = inspect.getfullargspec(f).args
# Ensure that we have the exact number of parameters that the # Ensure that we have the exact number of parameters that the
# function expects. This handles URLs like # function expects. This handles URLs like