Bug 2190392 - python-catkin_tools fails to build with Python 3.12: ImportError: cannot import name 'assert_raises_regexp' from 'nose.tools'
Summary: python-catkin_tools fails to build with Python 3.12: ImportError: cannot impo...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-catkin_tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Scott K Logan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2023-04-28 09:41 UTC by Tomáš Hrnčiar
Modified: 2023-07-25 19:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-25 19:57:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-04-28 09:41:14 UTC
python-catkin_tools fails to build with Python 3.12.0a7.

======================================================================
ERROR: Failure: ImportError (cannot import name 'assert_raises_regexp' from 'nose.tools' (/usr/lib/python3.12/site-packages/nose/tools/__init__.py))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.12/site-packages/nose/loader.py", line 416, in loadTestsFromName
    module = self.importer.importFromPath(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/imp.py", line 235, in load_module
    return load_source(name, filename, file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/imp.py", line 172, in load_source
    module = _load(spec)
             ^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 872, in _load
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1023, in exec_module
  File "<frozen importlib._bootstrap>", line 400, in _call_with_frames_removed
  File "/builddir/build/BUILD/catkin_tools-0.8.2/tests/unit/test_config.py", line 7, in <module>
    from nose.tools import assert_raises_regexp
ImportError: cannot import name 'assert_raises_regexp' from 'nose.tools' (/usr/lib/python3.12/site-packages/nose/tools/__init__.py)

assert_raises_regexp was removed in Python 3.12. Updating the package to the latest version should help, I don't see the problematic code there.

https://docs.python.org/3.12/whatsnew/3.12.html

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

For all our attempts to build python-catkin_tools with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
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.


Note You need to log in before you can comment on or make changes to this bug.