mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-84559: Remove the new multiprocessing warning, too disruptive. (#101551)
This reverts the core of #100618 while leaving relevant documentation improvements and minor refactorings in place.
This commit is contained in:
parent
f6c53b80a1
commit
d4c410f0f9
11 changed files with 27 additions and 189 deletions
|
@ -57,7 +57,6 @@ from functools import partial
|
|||
import itertools
|
||||
import sys
|
||||
from traceback import format_exception
|
||||
import warnings
|
||||
|
||||
|
||||
_threads_wakeups = weakref.WeakKeyDictionary()
|
||||
|
@ -651,22 +650,6 @@ class ProcessPoolExecutor(_base.Executor):
|
|||
mp_context = mp.get_context("spawn")
|
||||
else:
|
||||
mp_context = mp.get_context()
|
||||
if (mp_context.get_start_method() == "fork" and
|
||||
mp_context == mp.context._default_context._default_context):
|
||||
warnings.warn(
|
||||
"The default multiprocessing start method will change "
|
||||
"away from 'fork' in Python >= 3.14, per GH-84559. "
|
||||
"ProcessPoolExecutor uses multiprocessing. "
|
||||
"If your application requires the 'fork' multiprocessing "
|
||||
"start method, explicitly specify that by passing a "
|
||||
"mp_context= parameter. "
|
||||
"The safest start method is 'spawn'.",
|
||||
category=mp.context.DefaultForkDeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
# Avoid the equivalent warning from multiprocessing itself via
|
||||
# a non-default fork context.
|
||||
mp_context = mp.get_context("fork")
|
||||
self._mp_context = mp_context
|
||||
|
||||
# https://github.com/python/cpython/issues/90622
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue