From 27a57a7cdfd65952a545352d9c9d40e39d36e9ef Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 26 Nov 2023 15:23:17 +0900 Subject: [PATCH] Replace deprecated inspector.getargspec This method was deprecated in python 3.0 and was removed in python 3.11. Change-Id: Ie8cb828a00f7d379e69f1d845a5b04b6bb25e49e --- magnumclient/common/cliutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magnumclient/common/cliutils.py b/magnumclient/common/cliutils.py index f1f3f39d..31eb84f8 100644 --- a/magnumclient/common/cliutils.py +++ b/magnumclient/common/cliutils.py @@ -89,7 +89,7 @@ def validate_args(fn, *args, **kwargs): :param arg: the positional arguments supplied :param kwargs: the keyword arguments supplied """ - argspec = inspect.getargspec(fn) + argspec = inspect.getfullargspec(fn) num_defaults = len(argspec.defaults or []) required_args = argspec.args[:len(argspec.args) - num_defaults]