Fix inspect module deprecation warning
DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() Change-Id: I3707546e77acb9dec56ec33cbabb3e6228525f9c
This commit is contained in:
parent
0356f6eaf1
commit
d46eb24980
@ -812,8 +812,8 @@ class TestCase(base.BaseTestCase):
|
||||
|
||||
def _ensure_interface(self, interface, implementation):
|
||||
for name in interface.__abstractmethods__:
|
||||
in_arginfo = inspect.getargspec(getattr(interface, name))
|
||||
im_arginfo = inspect.getargspec(getattr(implementation, name))
|
||||
in_arginfo = inspect.getfullargspec(getattr(interface, name))
|
||||
im_arginfo = inspect.getfullargspec(getattr(implementation, name))
|
||||
|
||||
self.assertEqual(
|
||||
in_arginfo, im_arginfo,
|
||||
|
@ -190,7 +190,7 @@ def validate_uuid(*check):
|
||||
"""
|
||||
def inner(f):
|
||||
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
|
||||
# function expects. This handles URLs like
|
||||
|
Loading…
Reference in New Issue
Block a user