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
Fix multiprocessing warnings when runnign tests on Python 3.12 (#16564)
I saw a bunch of warnings when running tests in parallel using pytest.
When running tests sequentially using `-n0` I didn't see warnings. This
only seems to happen on Linux.
The warnings were like these, which can be fixed by avoiding the use of
fork, and using forkserver instead:
```
mypy/test/teststubgen.py::StubgenPythonSuite::stubgen.test::testNestedClass_inspect
/usr/local/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=84587) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
```
Relevant discussion:
https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555
0 commit comments