Merge "Use getfullargspec to inspect functions"

This commit is contained in:
Zuul 2020-07-02 08:12:27 +00:00 committed by Gerrit Code Review
commit 9c814da74b
2 changed files with 3 additions and 2 deletions

View File

@ -123,7 +123,7 @@ def expose(*args, **kwargs):
) )
pecan_json_decorate(callfunction) pecan_json_decorate(callfunction)
pecan.util._cfg(callfunction)['argspec'] = inspect.getargspec(f) pecan.util._cfg(callfunction)['argspec'] = inspect.getfullargspec(f)
callfunction._wsme_definition = funcdef callfunction._wsme_definition = funcdef
return callfunction return callfunction

View File

@ -37,7 +37,8 @@ def wrapfunc(f):
def getargspec(f): def getargspec(f):
f = getattr(f, '_wsme_original_func', 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): class FunctionArgument(object):