-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
GH-84559: Deprecate fork being the multiprocessing default. #100618
GH-84559: Deprecate fork being the multiprocessing default. #100618
Conversation
This starts the process. Users who don't specify their own start method and use the default on platforms where it is 'fork' will see a DeprecationWarning upon multiprocessing.Pool() construction or upon multiprocessing.Process.start().
This code could be a lot cleaner if #39615 were implemented... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to test_asyncio LGTM. I hope I won't have to review the rest, I know basically nothing about multiprocessing. :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the asyncio
change.
Please could you add this to What's New, under Pending Removal in Python 3.14? |
Ahha, I knew we had a list of upcoming things somewhere. Good idea, done! What's New text added. |
|
|
|
|
This reverts the core of python#100618 while leaving relevant documentation improvements and minor refactorings in place.
The default of `fork` is known to be problematic. Python itself is changing the default to `spawn`. The new default is expected to be in place for Python 3.14. Python references for the change to the default: * python/cpython#84559 * python/cpython#100618 We also have several places where this option had to be set to `spawn` to make tests work. The AMD code even checks and overrides the value if it's not set to `spawn`. Simplify things for everyone and just default to `spawn`, but leave the option in place just in case, at least for now. Signed-off-by: Russell Bryant <[email protected]>
This starts the process. Users who don't specify their own start method and use the default on platforms where it is 'fork' will see a DeprecationWarning upon multiprocessing.Pool() construction or upon multiprocessing.Process.start().
'fork'
is broken: change to `'forkserver' || 'spawn'
#84559