Merge pull request #449 from jkominek/python-getfullargspec
use inspect.getfullargspec when available
This commit is contained in:
commit
a1901701d6
|
@ -227,7 +227,10 @@ def transactional(*tr_args, **tr_kwargs):
|
|||
wfunc = func
|
||||
while getattr(wfunc, '__wrapped__', None):
|
||||
wfunc = wfunc.__wrapped__
|
||||
index = inspect.getargspec(wfunc).args.index(parameter)
|
||||
if hasattr(inspect, 'getfullargspec'):
|
||||
index = inspect.getfullargspec(wfunc).args.index(parameter)
|
||||
else:
|
||||
index = inspect.getargspec(wfunc).args.index(parameter)
|
||||
|
||||
if getattr(func, '_is_coroutine', False):
|
||||
@functools.wraps(func)
|
||||
|
|
Loading…
Reference in New Issue