Bug 2414804

Summary: python-trio fails to build with Python 3.15: test_clear_thread_cache_after_fork: DeprecationWarning: This process (pid=1742) is multi-threaded, use of fork() may lead to deadlocks in the child.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-trioAssignee: Carl George 🤠 <carl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: carl, code, ksurma, mhroncok, python-packagers-sig
Target Milestone: ---Flags: fedora-admin-xmlrpc: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-trio-0.32.0-1.fc44 python-trio-0.32.0-1.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-11-22 23:58:21 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: 2412434    

Description Karolina Surma 2025-11-13 11:10:46 UTC
python-trio fails to build with Python 3.15.0a1.

______________________ test_clear_thread_cache_after_fork ______________________

    @pytest.mark.skipif(not hasattr(os, "fork"), reason="os.fork isn't supported")
    def test_clear_thread_cache_after_fork() -> None:
        assert hasattr(os, "fork")
    
        def foo() -> None:
            pass
    
        # ensure the thread cache exists
        done = threading.Event()
        start_thread_soon(foo, lambda _: done.set())
        done.wait()
    
>       child_pid = os.fork()
E       DeprecationWarning: This process (pid=1742) is multi-threaded, use of fork() may lead to deadlocks in the child.

../BUILDROOT/usr/lib/python3.15/site-packages/trio/_core/_tests/test_thread_cache.py:213: DeprecationWarning

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/09789929-python-trio/

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

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.

Comment 1 Fedora Update System 2025-11-22 23:54:08 UTC
FEDORA-2025-3d6ff0387c (python-anyio-4.11.0-1.fc44 and python-trio-0.32.0-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-3d6ff0387c

Comment 2 Fedora Update System 2025-11-22 23:58:21 UTC
FEDORA-2025-3d6ff0387c (python-anyio-4.11.0-1.fc44 and python-trio-0.32.0-1.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 3 Fedora Update System 2025-11-23 07:07:13 UTC
FEDORA-2025-0b6547a366 (python-anyio-4.11.0-1.fc43 and python-trio-0.32.0-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-0b6547a366

Comment 4 Fedora Update System 2025-11-24 01:10:18 UTC
FEDORA-2025-0b6547a366 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-0b6547a366`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-0b6547a366

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2025-11-27 00:47:13 UTC
FEDORA-2025-0b6547a366 (python-anyio-4.11.0-1.fc43 and python-trio-0.32.0-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.