8000 gh-80334: fix multiprocessing.freeze_support for other spawn platforms by eddymul · Pull Request #134462 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-80334: fix multiprocessing.freeze_support for other spawn platforms #134462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 24, 2025

Conversation

eddymul
Copy link
Contributor
@eddymul eddymul commented May 21, 2025

multiprocessing.freeze_support() now checks for work on any "spawn"
start method platform rather than only on Windows.


📚 Documentation preview 📚: https://cpython-previews--134462.org.readthedocs.build/en/134462/library/multiprocessing.html#multiprocessing.freeze_support

…ge to specify spawn method instead of platform
@eddymul eddymul requested a review from gpshead as a code owner May 21, 2025 19:09
@python-cla-bot
Copy link
python-cla-bot bot commented May 21, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

8000
@gpshead
Copy link
Member
gpshead commented May 24, 2025

reading things over, i'm convinced you are correct that this needs to not just use a win32 check. i moved my #134617 changes over into this PR.

@gpshead gpshead changed the title gh-80334: Doc/library/multiprocessing.rst: freeze_support: Change to … gh-80334: fix multiprocessing.freeze_support for other spawn platforms May 24, 2025
@gpshead gpshead self-assigned this May 24, 2025
@gpshead gpshead added type-bug An unexpected behavior, bug, or error and removed skip news labels May 24, 2025
@gpshead gpshead enabled auto-merge (squash) May 24, 2025 03:31
@gpshead gpshead merged commit 80284b5 into python:main May 24, 2025
43 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 24, 2025
@miss-islington-app
Copy link

Thanks @eddymul for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2025
…atforms (pythonGH
8000
-134462)

Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------
(cherry picked from commit 80284b5)

Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2025
…atforms (pythonGH-134462)

Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------
(cherry picked from commit 80284b5)

Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-app
Copy link
bedevere-app bot commented May 24, 2025

GH-134619 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 24, 2025
@bedevere-app
Copy link
bedevere-app bot commented May 24, 2025

GH-134620 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 24, 2025
gpshead added a commit that referenced this pull request May 24, 2025
…latforms (GH-134462) (#134620)

gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)

Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------
(cherry picked from commit 80284b5)

Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gpshead added a commit that referenced this pull request May 24, 2025
…latforms (GH-134462) (#134619)

gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)

Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------
(cherry picked from commit 80284b5)

Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows Server 2022 NoGIL 3.13 (tier-1) has failed when building commit 44d1849.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1488/builds/1340) and take a look at the build logs.
  4. Check if the failure is related to this commit (44d1849) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1488/builds/1340

Failed tests:

  • test_launcher

Failed subtests:

  • test_search_major_3 - test.test_launcher.TestLauncher.test_search_major_3
  • test_search_major_2 - test.test_launcher.TestLauncher.test_search_major_2

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_launcher.py", line 445, in test_search_major_3
    self.assertEqual("PythonCore", data["env.company"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'PythonCore' != 'PythonTestSuite'
- PythonCore
+ PythonTestSuite


Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_launcher.py", line 465, in test_search_major_2
    self.assertEqual("PythonCore", data["env.company"])
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'PythonCore' != 'PythonTestSuite'
- PythonCore
+ PythonTestSuite

hugovk added a commit to hugovk/cpython that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-multiprocessing type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants
0