Bug 2094337

Summary: python-catkin_tools fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-catkin_toolsAssignee: Scott K Logan <logans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: logans, mhroncok, richmattes, robotics, sanjay.ankur, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-catkin_tools-0.8.2-4.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-22 18:06:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016048, 2045102, 2045109    

Description Tomáš Hrnčiar 2022-06-07 12:21:26 UTC
python-catkin_tools fails to build with Python 3.11.0b3.

======================================================================
ERROR: tests.system.verbs.catkin_config.test_config.test_config_no_ws
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.system.verbs.catkin_config.test_config.test_config_non_bare
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.system.verbs.catkin_config.test_config.test_config_unchanged
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.system.verbs.catkin_init.test_init.test_init_local_no_src
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.unit.test_config.test_get_verb_aliases
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.unit.test_config.test_verb_alias_config_initialization
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

======================================================================
ERROR: tests.unit.test_config.test_config_initialization
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mock/mock.py", line 1346, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/utils.py", line 119, in decorated
    from inspect import getargspec
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib64/python3.11/inspect.py)

----------------------------------------------------------------------
Ran 39 tests in 1.375s

FAILED (errors=7)

Removed from the inspect module:
    the getargspec function, deprecated since Python 3.0; use inspect.signature() or inspect.getfullargspec() instead.
    the formatargspec function, deprecated since Python 3.5; use the inspect.signature() function and Signature object directly.
    the undocumented Signature.from_builtin and Signature.from_function functions, deprecated since Python 3.5; use the Signature.from_callable() method instead.

(Contributed by Hugo van Kemenade in bpo-45320.)

https://bugs.python.org/issue?@action=redirect&bpo=45320
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04495099-python-catkin_tools/

For all our attempts to build python-catkin_tools with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-catkin_tools/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2022-06-20 10:17:33 UTC
*** Bug 2098859 has been marked as a duplicate of this bug. ***

Comment 2 Fedora Update System 2022-07-22 18:05:50 UTC
FEDORA-2022-aa612a55d8 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-aa612a55d8

Comment 3 Fedora Update System 2022-07-22 18:06:08 UTC
FEDORA-2022-aa612a55d8 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.