-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Needed
-
-
None
-
None
-
None
-
None
-
None
-
None
Summary
Three tests in test/test_fork.py fail on Python 3.15 (ubuntu-latest) in GitHub Actions CI on PR #2840 (PYTHON-5837 Add beta Python 3.15).
Failing Tests
- test/test_fork.py::TestFork::test_lock_client
- test/test_fork.py::TestFork::test_lock_object_id
- test/test_fork.py::TestFork::test_topology_reset
Error
FAILED test/test_fork.py::TestFork::test_lock_client - DeprecationWarning: This process (pid=3104) is multi-threaded, use of fork() may lead to deadlocks in the child. FAILED test/test_fork.py::TestFork::test_lock_object_id - DeprecationWarning: This process (pid=3104) is multi-threaded, use of fork() may lead to deadlocks in the child. FAILED test/test_fork.py::TestFork::test_topology_reset - DeprecationWarning: This process (pid=3104) is multi-threaded, use of fork() may lead to deadlocks in the child. = 3 failed, 4633 passed, 3416 skipped ... in 715.16s =
Context
Python 3.12 introduced a DeprecationWarning when os.fork() is called in a multi-threaded process. On Python 3.15, this causes the fork tests to fail (likely because warnings are treated as errors in the test configuration, or the behavior changed further).
Observed in: https://github.com/mongodb/mongo-python-driver/actions/runs/27243403891/job/80452029519
Resolution
The fork tests need to be updated to handle or suppress this warning on Python 3.15+, or the underlying forking approach needs to be revisited for multi-threaded contexts.
- is related to
-
PYTHON-6077 Officially support Python 3.15
-
- In Progress
-