Bug 2275067 - python-typeguard fails to build with Python 3.13: TypeError: TypedDict does not support instance and class checks
Summary: python-typeguard fails to build with Python 3.13: TypeError: TypedDict does n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-typeguard
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2283405
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-04-15 08:10 UTC by Karolina Surma
Modified: 2024-05-27 15:26 UTC (History)
6 users (show)

Fixed In Version: python-typeguard-4.3.0-1.fc41
Clone Of:
Environment:
Last Closed: 2024-05-27 15:26:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github agronholm typeguard issues 443 0 None closed "TypedDict does not support instance and class checks": interaction between `typing_extension`, `typeguard_ignore`, `att... 2024-04-15 17:19:42 UTC
Github agronholm typeguard issues 453 0 None open "TypedDict does not support instance and class checks" with Python 3.13 2024-04-15 17:38:44 UTC

Description Karolina Surma 2024-04-15 08:10:35 UTC
python-typeguard fails to build with Python 3.13.0a6.

____________ TestTypedDict.test_notrequired_fail[typing_extensions] ____________
tests/test_checkers.py:531: in test_notrequired_fail
    check_type({"x": 1, "y": "foo"}, DummyDict)
../../BUILDROOT/python-typeguard-4.2.1-2.fc41.x86_64/usr/lib/python3.13/site-packages/typeguard/_functions.py:106: in check_type
    check_type_internal(value, expected_type, memo)
../../BUILDROOT/python-typeguard-4.2.1-2.fc41.x86_64/usr/lib/python3.13/site-packages/typeguard/_checkers.py:783: in check_type_internal
    if not isinstance(value, origin_type):
/usr/lib/python3.13/site-packages/typing_extensions.py:951: in __subclasscheck__
    raise TypeError('TypedDict does not support instance and class checks')
E   TypeError: TypedDict does not support instance and class checks

============= 11 failed, 432 passed, 4 skipped, 6 xfailed in 5.84s =============

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07302975-python-typeguard/

For all our attempts to build python-typeguard with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-typeguard/

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

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Ben Beasley 2024-04-15 17:19:43 UTC
I found an upstream bug that appears to match. Investigating…

https://github.com/agronholm/typeguard/issues/443

Comment 2 Ben Beasley 2024-04-15 17:38:44 UTC
The existing bug was related, but not exactly the same, so I reported a new one: https://github.com/agronholm/typeguard/issues/453

Comment 3 Fedora Update System 2024-05-27 15:22:03 UTC
FEDORA-2024-cacef9feb2 (python-typeguard-4.3.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-cacef9feb2

Comment 4 Fedora Update System 2024-05-27 15:26:20 UTC
FEDORA-2024-cacef9feb2 (python-typeguard-4.3.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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