@@ -70,6 +70,22 @@ Summary -- release highlights
70
70
* :ref: `A new type of interpreter <whatsnew314-tail-call >`
71
71
72
72
73
+ Incompatible changes
74
+ ====================
75
+
76
+ On platforms other than macOS and Windows, the default :ref: `start
77
+ method <multiprocessing-start-methods>` for :mod: `multiprocessing `
78
+ and :class: `~concurrent.futures.ProcessPoolExecutor ` switches from
79
+ *fork * to *forkserver *.
80
+
81
+ See :ref: `(1) <whatsnew314-concurrent-futures-start-method >` and
82
+ :ref: `(2) <whatsnew314-multiprocessing-start-method >` for details.
83
+
84
+ If you encounter :exc: `NameError `\s or pickling errors coming out of
85
+ :mod: `multiprocessing ` or :mod: `concurrent.futures `, see the
86
+ :ref: `forkserver restrictions <multiprocessing-programming-forkserver >`.
87
+
88
+
73
89
New features
74
90
============
75
91
@@ -396,12 +412,26 @@ concurrent.futures
396
412
same process) to Python code. This is separate from the proposed API
397
413
in :pep: `734 `.
398
414
(Contributed by Eric Snow in :gh: `124548 `.)
399
- * The default ``ProcessPoolExecutor `` start method (see
400
- :ref: `multiprocessing-start-methods `) changed from *fork * to *forkserver * on
401
- platforms other than macOS & Windows. If you require the threading
402
- incompatible *fork * start method you must explicitly request it by
403
- supplying a *mp_context * to :class: `concurrent.futures.ProcessPoolExecutor `.
404
- (Contributed by Gregory P. Smith in :gh: `84559 `.)
415
+
416
+ .. _whatsnew314-concurrent-futures-start-method :
417
+
418
+ * The default :class: `~concurrent.futures.ProcessPoolExecutor `
419
+ :ref: `start method <multiprocessing-start-methods >` changed
420
+ from :ref: `fork <multiprocessing-start-method-fork >` to :ref: `forkserver
421
+ <multiprocessing-start-method-forkserver>` on platforms other than macOS and
422
+ Windows where it was already :ref: `spawn <multiprocessing-start-method-spawn >`.
423
+
424
+ If the threading incompatible *fork * method is required, you must explicitly
425
+ request it by supplying a multiprocessing context *mp_context * to
426
+ :class: `~concurrent.futures.ProcessPoolExecutor `.
427
+
428
+ See :ref: `forkserver restrictions <multiprocessing-programming-forkserver >`
429
+ for information and differences with the *fork * method and how this change
430
+ may affect existing code with mutable global shared variables and/or shared
431
+ objects that can not be automatically :mod: `pickled <pickle> `.
432
+
433
+ (Contributed by Gregory P. Smith in :gh: `84559 `.)
434
+
405
435
406
436
contextvars
407
437
-----------
@@ -637,18 +667,30 @@ mimetypes
637
667
multiprocessing
638
668
---------------
639
669
640
- * The default start method (see :ref: `multiprocessing-start-methods `) changed
641
- from *fork * to *forkserver * on platforms other than macOS & Windows where
642
- it was already *spawn *. If you require the threading incompatible *fork *
643
- start method you must explicitly request it using a context from
644
- :func: `multiprocessing.get_context ` (preferred) or change the default via
645
- :func: `multiprocessing.set_start_method `.
670
+ .. _whatsnew314-multiprocessing-start-method :
671
+
672
+ * The default :ref: `start method <multiprocessing-start-methods >` changed
673
+ from :ref: `fork <multiprocessing-start-method-fork >` to :ref: `forkserver
674
+ <multiprocessing-start-method-forkserver>` on platforms other than macOS and
675
+ Windows where it was already :ref: `spawn <multiprocessing-start-method-spawn >`.
676
+
677
+ If the threading incompatible *fork * method is required, you must explicitly
678
+ request it via a context from :func: `multiprocessing.get_context ` (preferred)
679
+ or change the default via :func: `multiprocessing.set_start_method `.
680
+
681
+ See :ref: `forkserver restrictions <multiprocessing-programming-forkserver >`
682
+ for information and differences with the *fork * method and how this change
683
+ may affect existing code with mutable global shared variables and/or shared
684
+ objects that can not be automatically :mod: `pickled <pickle> `.
685
+
646
686
(Contributed by Gregory P. Smith in :gh: `84559 `.)
687
+
647
688
* :mod: `multiprocessing `'s ``"forkserver" `` start method now authenticates
648
689
its control socket to avoid solely relying on filesystem permissions
649
690
to restrict what other processes could cause the forkserver to spawn workers
650
691
and run code.
651
692
(Contributed by Gregory P. Smith for :gh: `97514 `.)
693
+
652
694
* The :ref: `multiprocessing proxy objects <multiprocessing-proxy_objects >`
653
695
for *list * and *dict * types gain previously overlooked missing methods:
654
696
0 commit comments