◐ Shell
clean mode source ↗

GH-84559: Deprecate fork being the multiprocessing default. by gpshead · Pull Request #100618 · python/cpython

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().

@gpshead

FFY00

@gpshead

@gpshead gpshead added the stdlib

Standard Library Python modules in the Lib/ directory

label

Jan 28, 2023

@gpshead gpshead marked this pull request as ready for review

January 28, 2023 04:28

gvanrossum

kumaraditya303

@gpshead

@gpshead gpshead deleted the multiprocessing/deprecate-fork-default branch

February 2, 2023 23:50

gpshead added a commit to gpshead/cpython that referenced this pull request

Feb 3, 2023
This reverts the core of python#100618 while leaving relevant documentation
improvements and minor refactorings in place.

gpshead added a commit that referenced this pull request

Feb 3, 2023
…01551)

This reverts the core of #100618 while leaving relevant documentation
improvements and minor refactorings in place.

russellb added a commit to russellb/vllm that referenced this pull request

Sep 18, 2024
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 <rbryant@redhat.com>