Bug 2246127

Summary: python-typeguard fails to build with Python 3.13: DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-typeguardAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, davide, epel-packagers-sig, ksurma, mhroncok, michel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-typeguard-4.1.5-2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-10-26 12:25:11 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: 2244836    

Description Karolina Surma 2023-10-25 14:05:29 UTC
python-typeguard fails to build with Python 3.13.0a1.

Test suite is failing on DeprecationWarning, example traceback: 

__________________________ test_debug_instrumentation __________________________
tests/test_importhook.py:65: in test_debug_instrumentation
    import_dummymodule()
tests/test_importhook.py:29: in import_dummymodule
    module = import_module("dummymodule")
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1381: in _gcd_import
    ???
<frozen importlib._bootstrap>:1354: in _find_and_load
    ???
<frozen importlib._bootstrap>:1325: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:929: in _load_unlocked
    ???
../../BUILDROOT/python-typeguard-4.1.5-1.fc40.x86_64/usr/lib/python3.13/site-packages/typeguard/_importhook.py:98: in exec_module
    super().exec_module(module)
<frozen importlib._bootstrap_external>:1008: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/dummymodule.py:42: in <module>
    @no_type_check_decorator
/usr/lib64/python3.13/typing.py:2379: in no_type_check_decorator
    warnings._deprecated("typing.no_type_check_decorator", remove=(3, 15))
/usr/lib64/python3.13/warnings.py:529: in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
E   DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15

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/06563868-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 2023-10-25 14:31:28 UTC
I have reported the new DeprecationWarning upstream[1]; I intend to add a downstream patch to stop treating warnings as errors when running the tests.

[1] https://github.com/agronholm/typeguard/issues/414

Comment 2 Fedora Update System 2023-10-26 12:24:04 UTC
FEDORA-2023-f126922171 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f126922171

Comment 3 Fedora Update System 2023-10-26 12:25:11 UTC
FEDORA-2023-f126922171 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.