]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295) (#138607)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 Oct 2025 00:37:04 +0000 (02:37 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Oct 2025 00:37:04 +0000 (00:37 +0000)
commit64f0e2d6fac3729ea1bc7ea3a07934e8b486d608
tree454432e641afa41a4f606d13ded064926c19aff3
parent6b090c92723083b365fac5f1836e4657705da9fe
[3.14] gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295) (#138607)

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.

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

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.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]