Bug 2447904

Summary: python-beartype fails to build with Python 3.15: ImportError: cannot import name 'no_type_check_decorator' from 'typing' (/usr/lib64/python3.15/typing.py)
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-beartypeAssignee: Paul Wouters <paul.wouters>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, maxwell, mhroncok, orange, paul.wouters, rj.layco
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2412434    

Description Karolina Surma 2026-03-16 10:00:55 UTC
python-beartype fails to build with Python 3.15.0a7.

Traceback
=========

      File "/usr/lib/python3.15/site-packages/sphinx/config.py", line 611, in eval_config_file
        raise ConfigError(msg % traceback.format_exc()) from exc
    sphinx.errors.ConfigError: There is a programmable error in your configuration file:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.15/site-packages/sphinx/config.py", line 596, in eval_config_file
        exec(code, namespace)  # NoQA: S102
        ~~~~^^^^^^^^^^^^^^^^^
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/doc/src/conf.py", line 84, in <module>
        from beartype.meta import (
        ...<13 lines>...
        )
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/beartype/__init__.py", line 150, in <module>
        _init()
        ~~~~~^^
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/beartype/__init__.py", line 71, in _init
        from beartype.meta import (
        ...<4 lines>...
        )
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/beartype/meta.py", line 33, in <module>
        from beartype._util.text.utiltextversion import (
            convert_str_version_to_tuple as _convert_str_version_to_tuple)
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/beartype/_util/text/utiltextversion.py", line 15, in <module>
        from beartype.typing import Tuple
      File "/builddir/build/BUILD/python-beartype-0.22.9-build/beartype-0.22.9/beartype/typing/__init__.py", line 183, in <module>
        from typing import (
        ...<35 lines>...
        )
    ImportError: cannot import name 'no_type_check_decorator' from 'typing' (/usr/lib64/python3.15/typing.py)

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10222388-python-beartype/

For all our attempts to build python-beartype with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/python-beartype/

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.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

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