]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295) (#138609)
authorGregory P. Smith <68491+gpshead@users.noreply.github.com>
Mon, 8 Sep 2025 18:13:23 +0000 (11:13 -0700)
committerGitHub <noreply@github.com>
Mon, 8 Sep 2025 18:13:23 +0000 (11:13 -0700)
commit9a6137ad4b14018a1e1b28d9222f0af688d60c54
tree7650e3e7da8d01c828722e37f24738d19c30087b
parentbb1714016a0708873a431d21796d6c2bd42af051
[3.13] gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295) (#138609)

gh-126631: gh-137996: fix pre-loading of `__main__`

The `main_path` parameter was renamed `init_main_from_name`, update the
forkserver code accordingly.  This was leading to slower startup times when people
were trying to preload the main module.

---------
(cherry picked from commit 0912b3a6dbd226bea79eb8d70d5a06230804d4cb)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Lib/multiprocessing/forkserver.py
Lib/test/_test_multiprocessing.py
Lib/test/mp_preload_main.py [new file with mode: 0644]
Misc/NEWS.d/next/Library/2025-06-10-21-00-48.gh-issue-126631.eITVJd.rst [new file with mode: 0644]