Skip to content

[3.13] gh-79366: Fix a race condition when removing a logging handler (GH-154528) - #155078

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-083e038-3.13
Aug 2, 2026
Merged

[3.13] gh-79366: Fix a race condition when removing a logging handler (GH-154528)#155078
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-083e038-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

removeHandler() mutated the handler list in place, so if a handler was
removed while callHandlers() was iterating the same list, the following
handlers could be skipped. Replace the list instead of mutating it.
(cherry picked from commit 083e038)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Ben Spiller 11992588+ben-spiller@users.noreply.github.com
Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

…ythonGH-154528)

removeHandler() mutated the handler list in place, so if a handler was
removed while callHandlers() was iterating the same list, the following
handlers could be skipped.  Replace the list instead of mutating it.
(cherry picked from commit 083e038)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ben Spiller <11992588+ben-spiller@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@miss-islington
miss-islington requested a review from vsajip as a code owner August 2, 2026 10:16
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 2, 2026 10:20
@serhiy-storchaka
serhiy-storchaka merged commit 3d70247 into python:3.13 Aug 2, 2026
43 checks passed
@miss-islington
miss-islington deleted the backport-083e038-3.13 branch August 2, 2026 10:34
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