You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Our test suite uses a combination of multiprocessing and multithreading. This can be dangerous when the multiprocessing start methodfork is used. Start method spawn would be the safe choice in this context.
By default, current Python releases default to spawn on Windows and macOS, but use fork on Linux, which is what we use in CI/CD. Since Python 3.12, this triggers DeprecationWarnings, such as here:
tests/test_stubber.py::test_add_client_error
/usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=2749) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
We should ensure that multiprocessing always uses spawn in the context of our test suite. I will propose a fix.
This could actually also explain the flakiness experienced in #1266. Fingers crossed...
The text was updated successfully, but these errors were encountered:
Describe the bug
Our test suite uses a combination of multiprocessing and multithreading. This can be dangerous when the multiprocessing start method
fork
is used. Start methodspawn
would be the safe choice in this context.By default, current Python releases default to
spawn
on Windows and macOS, but usefork
on Linux, which is what we use in CI/CD. Since Python 3.12, this triggersDeprecationWarnings
, such as here:We should ensure that multiprocessing always uses
spawn
in the context of our test suite. I will propose a fix.This could actually also explain the flakiness experienced in #1266. Fingers crossed...
The text was updated successfully, but these errors were encountered: