From c66ca93b2e9d8db82d196f144ba60482fb92d716 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Thu, 29 Dec 2022 14:16:33 +0100 Subject: Add compatability for Python 3.10 and later to acprep Fixes #2154 --- acprep | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'acprep') diff --git a/acprep b/acprep index 6c7f6e1a..86637eec 100755 --- a/acprep +++ b/acprep @@ -193,7 +193,10 @@ class CommandLineApp(object): # not let us differentiate between application errors and a case # where the user has not passed us enough arguments. So, we check # the argument count ourself. - argspec = inspect.getargspec(self.main) + if sys.version_info < (3, 10): + argspec = inspect.getargspec(self.main) + else: + argspec = inspect.getfullargspec(self.main) expected_arg_count = len(argspec[0]) - 1 if len(main_args) >= expected_arg_count: -- cgit v1.2.3