getargspec is deprecated in Python3

This commit is contained in:
Kay0u 2021-04-13 18:18:15 +02:00
parent 42d671b7c0
commit 8b360ac2e6
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -340,9 +340,9 @@ def is_unit_operation(
# Indeed, we use convention naming in this decorator and we need to
# know name of each args (so we need to use kwargs instead of args)
if len(args) > 0:
from inspect import getargspec
from inspect import signature
keys = getargspec(func).args
keys = list(signature(func).parameters.keys())
if "operation_logger" in keys:
keys.remove("operation_logger")
for k, arg in enumerate(args):