@@ -23,9 +23,6 @@ class TimeoutError(ProcessError):
2323class AuthenticationError (ProcessError ):
2424pass
2525
26- class DefaultForkDeprecationWarning (DeprecationWarning ):
27- pass
28-
2926#
3027# Base type for contexts. Bound methods of an instance of this type are included in __all__ of __init__.py
3128#
@@ -284,23 +281,6 @@ def _Popen(process_obj):
284281from .popen_fork import Popen
285282return Popen (process_obj )
286283
287- _warn_package_prefixes = (os .path .dirname (__file__ ),)
288-
289- class _DeprecatedForkProcess (ForkProcess ):
290- @classmethod
291- def _Popen (cls ,process_obj ):
292- import warnings
293- warnings .warn (
294- "The default multiprocessing start method will change "
295- "away from 'fork' in Python >= 3.14, per GH-84559. "
296- "Use multiprocessing.get_context(X) or .set_start_method(X) to "
297- "explicitly specify it when your application requires 'fork'. "
298- "The safest start method is 'spawn'." ,
299- category = DefaultForkDeprecationWarning ,
300- skip_file_prefixes = _warn_package_prefixes ,
301- )
302- return super ()._Popen (process_obj )
303-
304284class SpawnProcess (process .BaseProcess ):
305285_start_method = 'spawn'
306286@staticmethod
@@ -324,9 +304,6 @@ class ForkContext(BaseContext):
324304_name = 'fork'
325305Process = ForkProcess
326306
327- class _DefaultForkContext (ForkContext ):
328- Process = _DeprecatedForkProcess
329-
330307class SpawnContext (BaseContext ):
331308_name = 'spawn'
332309Process = SpawnProcess
@@ -342,16 +319,13 @@ def _check_available(self):
342319'fork' :ForkContext (),
343320'spawn' :SpawnContext (),
344321'forkserver' :ForkServerContext (),
345- # Remove None and _DefaultForkContext() when changing the default
346- # in 3.14 for https://github.com/python/cpython/issues/84559.
347- None :_DefaultForkContext (),
348322 }
349323if sys .platform == 'darwin' :
350324# bpo-33725: running arbitrary code after fork() is no longer reliable
351325# on macOS since macOS 10.14 (Mojave). Use spawn by default instead.
352326_default_context = DefaultContext (_concrete_contexts ['spawn' ])
353327else :
354- _default_context = DefaultContext (_concrete_contexts [None ])
328+ _default_context = DefaultContext (_concrete_contexts ['fork' ])
355329
356330else :
357331