catkin / catkin_tools

Command line tools for working with catkin
Apache License 2.0
163 stars 146 forks source link

Tests are broken with Python 3.11 #730

Closed cottsay closed 2 years ago

cottsay commented 2 years ago

It appears that the tests for catkin_tools are attempting an import operation which is no longer possible in Python 3.11:

ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

Here's the spot: https://github.com/catkin/catkin_tools/blob/0918ea5865014053bd5786b629001d70e02a314c/tests/utils.py#L118

First reported here: https://bugzilla.redhat.com/show_bug.cgi?id=2094337

cottsay commented 2 years ago

Evidently getargspec has been deprecated since Python 3.0. From the Bugzilla ticket:

the getargspec function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead.