Skip to content

[3.14] gh-140814: Fix freeze_support() setting start method as side effect (GH-144608)#146008

Merged
gpshead merged 1 commit intopython:3.14from
miss-islington:backport-ee53180-3.14
Mar 16, 2026
Merged

[3.14] gh-140814: Fix freeze_support() setting start method as side effect (GH-144608)#146008
gpshead merged 1 commit intopython:3.14from
miss-islington:backport-ee53180-3.14

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 16, 2026

freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.
(cherry picked from commit ee53180)

Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com

…fect (pythonGH-144608)

freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.
(cherry picked from commit ee53180)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@gpshead gpshead enabled auto-merge (squash) March 16, 2026 05:51
@gpshead gpshead merged commit a887eae into python:3.14 Mar 16, 2026
53 checks passed
@miss-islington miss-islington deleted the backport-ee53180-3.14 branch March 16, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants