Skip to content

Commit 37a615c

Browse files
committed
Prepare salt.utils.process for python 3.14
Python 3.14 changed multiprocessing method from 'fork' to 'forkserver' on Linux too: python/cpython#84559 This leads to issue similar to when Python 3.8 changed it on Mac OS: #57742 Change the condition to check for != 'fork' instead of == 'spawn'.
1 parent 3ce11a7 commit 37a615c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/68148.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Update packaged python from 3.10 to 3.11
2+
Fix salt.utils.process for python 3.14

salt/utils/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ def __new__(cls, *args, **kwargs):
897897
instance._finalize_methods = []
898898
instance.__logging_config__ = salt._logging.get_logging_options_dict()
899899

900-
if salt.utils.platform.spawning_platform():
900+
if multiprocessing.get_start_method() != 'fork':
901901
# On spawning platforms, subclasses should call super if they define
902902
# __setstate__ and/or __getstate__
903903
instance._args_for_getstate = copy.copy(args)

0 commit comments

Comments
 (0)