From 38dd4b80df78c4bf611d690f276d0271fb0049e6 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 3 Jan 2023 14:29:53 +0000 Subject: [PATCH 1/2] Replace usage of inspect.getargspec with inspect.getfullargspec It's debatable whether this check is even still needed, but for now let's do the simple thing and update it to be compatible with modern Python versions. --- bin/dh_virtualenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dh_virtualenv b/bin/dh_virtualenv index 8bafbcf..0a422ad 100755 --- a/bin/dh_virtualenv +++ b/bin/dh_virtualenv @@ -57,7 +57,7 @@ def main(): # passed the packages keyword argument. Newer (like Ubuntu # Precise) expect the whole options to be passed. - arguments = inspect.getargspec(DebHelper.__init__).args + arguments = inspect.getfullargspec(DebHelper.__init__).args if 'packages' in arguments: dh = DebHelper(packages=options.package or None) else: From a165fccfe40f9957e0d7b5d5e054dbe2c7386f11 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 3 Jan 2023 14:36:31 +0000 Subject: [PATCH 2/2] Add a changelog entry --- doc/changes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changes.rst b/doc/changes.rst index 5ce5067..cd96408 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -19,6 +19,8 @@ Unreleased [`@blag `_, `@Kami `_, `@dennybaa `_, and `@StackStorm contributors `_] +* Replace usage of `inspect.getargspec` with `inspect.getfullargspec` for compatibility + with Python 3.11. 1.2.2 =====