]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295)
authorDuane Griffin <duaneg@dghda.com>
Sun, 7 Sep 2025 07:49:54 +0000 (19:49 +1200)
committerGitHub <noreply@github.com>
Sun, 7 Sep 2025 07:49:54 +0000 (07:49 +0000)
commit0912b3a6dbd226bea79eb8d70d5a06230804d4cb
tree01ff940935c80d430cbd5f4cb70c99c715973078
parent8ed5a2b56cc6a8635e586c641b0b837669f6677b
gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295)

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.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
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]