Fix python35 job failures
- inspect.getargspec()` was deprecated in Python 3.0 and will be removed in 3.6 (ETA late 2016). From Python 3.5 it started throwing a deprecation warning which leds some tests failures. Change-Id: Ic57fd8629031a1a7a3e72b36bff133faf67544db
This commit is contained in:
@@ -50,10 +50,10 @@ def validate_args(fn, *args, **kwargs):
|
||||
:param arg: the positional arguments supplied
|
||||
:param kwargs: the keyword arguments supplied
|
||||
"""
|
||||
argspec = inspect.getargspec(fn)
|
||||
argspec = list(inspect.signature(fn).parameters.keys())
|
||||
|
||||
num_defaults = len(argspec.defaults or [])
|
||||
required_args = argspec.args[:len(argspec.args) - num_defaults]
|
||||
num_defaults = len(argspec or [])
|
||||
required_args = argspec[:len(argspec) - num_defaults]
|
||||
|
||||
def isbound(method):
|
||||
return getattr(method, '__self__', None) is not None
|
||||
|
Reference in New Issue
Block a user