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:
Gregory P. Smith 2023-02-03 15:20:46 -08:00 committed by GitHub
parent f6c53b80a1
commit d4c410f0f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 189 deletions

View file

@ -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