Use getfullargspec to inspect functions
The getfullargspec [1] function is maintained to provide compatibility with the deprecatad getargspec [2]. [1] https://docs.python.org/3/library/inspect.html#inspect.getfullargspec [2] https://docs.python.org/3/library/inspect.html#inspect.getargspec Change-Id: Ibf78672c15702af43ed2ee1256517b1a1a895120
This commit is contained in:
parent
57b619bf80
commit
498ab5224b
@ -123,7 +123,7 @@ def expose(*args, **kwargs):
|
||||
)
|
||||
|
||||
pecan_json_decorate(callfunction)
|
||||
pecan.util._cfg(callfunction)['argspec'] = inspect.getargspec(f)
|
||||
pecan.util._cfg(callfunction)['argspec'] = inspect.getfullargspec(f)
|
||||
callfunction._wsme_definition = funcdef
|
||||
return callfunction
|
||||
|
||||
|
@ -37,7 +37,8 @@ def wrapfunc(f):
|
||||
|
||||
def getargspec(f):
|
||||
f = getattr(f, '_wsme_original_func', f)
|
||||
return inspect.getargspec(f)
|
||||
func_argspec = inspect.getfullargspec(f)
|
||||
return func_argspec[0:4]
|
||||
|
||||
|
||||
class FunctionArgument(object):
|
||||
|
Loading…
x
Reference in New Issue
Block a user