Replace deprecated inspect.getargspec

inspect.getargspec was deprecated since Python 3.0 and
inspect.getfullargspec is its replacement with correct handling of
function annotations and keyword-only parameters[1].


Co-Authored-By: manchandavishal <>

Change-Id: Ie9cdf3e87a06a0af8cf36c8bbdef0f14336e8f70
Thomas Goirand 2022-12-01 10:23:19 +01:00 committed by manchandavishal
parent b526383eba
commit 2f5345a6d8
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ def handle_errors(error_message, error_default=None, request_arg=None):
def decorator(func):
# XXX This is an ugly hack for finding the 'request' argument.
if request_arg is None:
for _request_arg, name in enumerate(inspect.getargspec(func).args):
for _request_arg, name in enumerate(
if name == 'request':