Bug 2322721 - python-beartype fails to build with Python 3.14: ImportError: cannot import name 'ByteString' from 'typing'
Summary: python-beartype fails to build with Python 3.14: ImportError: cannot import n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-beartype
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Wouters
QA Contact:
URL:
Whiteboard:
: 2371817 (view as bug list)
Depends On:
Blocks: PYTHON3.14 F43FTBFS F43FailsToInstall 2372143 2372219
TreeView+ depends on / blocked
 
Reported: 2024-10-30 11:40 UTC by Karolina Surma
Modified: 2025-11-23 04:25 UTC (History)
9 users (show)

Fixed In Version: python-beartype-0.21.0^20240712gita3a0fff-1.fc43
Clone Of:
Environment:
Last Closed: 2025-07-25 04:22:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github beartype beartype issues 537 0 None open Support Python 3.14 2025-06-26 20:15:35 UTC

Description Karolina Surma 2024-10-30 11:40:32 UTC
python-beartype fails to build with Python 3.14.0a1.

There's one ImportError and 26 failed tests:

ERROR beartype_test/a00_unit/a40_api/door/a90_func/test_door_func.py::test_door_is_subhint
FAILED beartype_test/a00_unit/a00_core/test_a90_typing.py::test_api_typing - ...
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a00_utilpepget.py::test_get_hint_pep_sign
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a90_utilpeptest.py::test_is_hint_pep_typing
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a90_utilpeptest.py::test_is_hint_pep_type_typing
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a90_utilpeptest.py::test_is_hint_pep
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a90_utilpeptest.py::test_is_hint_pep_supported
FAILED beartype_test/a00_unit/a20_util/hint/a00_pep/test_a90_utilpeptest.py::test_die_if_hint_pep_unsupported
FAILED beartype_test/a00_unit/a20_util/hint/a90_core/test_utilhinttest.py::test_die_unless_hint
FAILED beartype_test/a00_unit/a20_util/hint/a90_core/test_utilhinttest.py::test_is_hint
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_is_bearable_warnings
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_die_if_unbearable
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_typehint_die_if_unbearable
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_is_bearable
FAILED beartype_test/a00_unit/a60_check/a90_door/test_checkdoor.py::test_door_typehint_is_bearable
FAILED beartype_test/a00_unit/a70_decor/a40_code/a00_module/test_decor_mypy.py::test_decor_mypy_notimplemented
FAILED beartype_test/a00_unit/a70_decor/a40_code/a80_nonpep/test_codenonpep.py::test_nonpep_pass_param_tuple
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/pep484/test_pep484ref.py::test_pep484_ref_data
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/pep484/test_pep484ref.py::test_pep484_ref_call_fail
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/test_decorpep557.py::test_decor_pep577
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/test_decorpep563.py::test_pep563_module
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/test_decorpep563.py::test_pep563_hint_pep484_namedtuple
FAILED beartype_test/a00_unit/a70_decor/a40_code/a90_pep/test_decorpep591.py::test_decor_pep591
FAILED beartype_test/a00_unit/a70_decor/a60_main/test_beartype.py::test_beartype
FAILED beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_package
FAILED beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_packages
FAILED beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_all
FAILED beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartyping

According to https://docs.python.org/dev/whatsnew/3.14.html#typing

ByteString has been removed from both typing and collections.abc modules.
It had previously raised a DeprecationWarning since Python 3.12.


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

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

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

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
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 Aoife Moloney 2025-02-26 13:14:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Karolina Surma 2025-06-11 15:56:49 UTC
*** Bug 2371817 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Fails To Install 2025-06-20 19:49:29 UTC
Hello,

Please note that this comment was generated automatically by https://pagure.io/releng/blob/main/f/scripts/ftbfs-fti/follow-policy.py
If you feel that this output has mistakes, please open an issue at https://pagure.io/releng/

This package fails to install and maintainers are advised to take one of the following actions:

 - Fix this bug and close this bugzilla once the update makes it to the repository.
   (The same script that posted this comment will eventually close this bugzilla
   when the fixed package reaches the repository, so you don't have to worry about it.)

or

 - Move this bug to ASSIGNED if you plan on fixing this, but simply haven't done so yet.

or

 - Orphan the package if you no longer plan to maintain it.


If you do not take one of these actions, the process at https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs will continue.
This package may be orphaned in 7+ weeks.
This is the first reminder (step 3) from the policy.

Don't hesitate to ask for help on https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ if you are unsure how to fix this bug.

Comment 6 Fedora Update System 2025-07-25 04:18:18 UTC
FEDORA-2025-0a227dbfac (python-beartype-0.21.0^20240712gita3a0fff-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-0a227dbfac

Comment 7 Fedora Update System 2025-07-25 04:22:16 UTC
FEDORA-2025-0a227dbfac (python-beartype-0.21.0^20240712gita3a0fff-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Red Hat Bugzilla 2025-11-23 04:25:02 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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