gh-143547: Fix PyErr_FormatUnraisable() fallback#143557
Merged
vstinner merged 4 commits intopython:mainfrom Jan 9, 2026
Merged
gh-143547: Fix PyErr_FormatUnraisable() fallback#143557vstinner merged 4 commits intopython:mainfrom
vstinner merged 4 commits intopython:mainfrom
Conversation
Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. Fix test_sys.UnraisableHookTest: use the right decorator function to disable colors. Previously, tests were always skipped.
aisk
reviewed
Jan 8, 2026
ZeroIntensity
approved these changes
Jan 8, 2026
Member
ZeroIntensity
left a comment
There was a problem hiding this comment.
This looks user-facing, so I think it would be a good idea to add a news entry, but I'll leave the decision up to you. The rest of the PR looks good to me.
Member
Author
Ok, I added a NEWS entry. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @vstinner, I could not cleanly backport this to |
|
Sorry, @vstinner, I could not cleanly backport this to |
|
GH-143603 is a backport of this pull request to the 3.14 branch. |
vstinner
added a commit
to vstinner/cpython
that referenced
this pull request
Jan 9, 2026
Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. (cherry picked from commit 39a2bcf)
vstinner
added a commit
that referenced
this pull request
Jan 9, 2026
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 9, 2026
…GH-143557) (pythonGH-143603) pythongh-143547: Fix PyErr_FormatUnraisable() fallback (pythonGH-143557) Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. (cherry picked from commit 1d0baf1) Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit 39a2bcf)
vstinner
added a commit
that referenced
this pull request
Jan 9, 2026
…H-143603) (#143612) [3.14] gh-143547: Fix PyErr_FormatUnraisable() fallback (GH-143557) (GH-143603) gh-143547: Fix PyErr_FormatUnraisable() fallback (GH-143557) Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. (cherry picked from commit 1d0baf1) (cherry picked from commit 39a2bcf) Co-authored-by: Victor Stinner <vstinner@python.org>
reidenong
pushed a commit
to reidenong/cpython
that referenced
this pull request
Jan 12, 2026
Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. Fix test_sys.UnraisableHookTest: use the right decorator function to disable colors. Previously, tests were always skipped.
thunder-coding
pushed a commit
to thunder-coding/cpython
that referenced
this pull request
Feb 15, 2026
Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure. Fix test_sys.UnraisableHookTest: use the right decorator function to disable colors. Previously, tests were always skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hold a strong reference to 'hook' while calling the default unraisable took to log hook failure.
Fix test_sys.UnraisableHookTest: use the right decorator function to disable colors. Previously, tests were always skipped.
sys.unraisablehookfails and falls back to default logger #143547