-
-
Notifications
You must be signed in to change notification settings - Fork 371
Open
Description
In early Fedora integration work with development versions of Python 3.15, we found that test_clear_thread_cache_after_fork fails with the following DeprecationWarning:
=================================== FAILURES ===================================
______________________ 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=1741) 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
=========================== short test summary info ============================
FAILED _core/_tests/test_thread_cache.py::test_clear_thread_cache_after_fork
====== 1 failed, 695 passed, 85 skipped, 8 deselected, 3 xfailed in 6.34s ======
Metadata
Metadata
Assignees
Labels
No labels