]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143547: Fix PyErr_FormatUnraisable() fallback (#143557)
authorVictor Stinner <vstinner@python.org>
Fri, 9 Jan 2026 12:16:22 +0000 (13:16 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Jan 2026 12:16:22 +0000 (13:16 +0100)
commit39a2bcf949095bd603f7b73f15b5b478dbb49ba9
treeecad33bc6b7c3ba386f8eee04c2d8550eda006b7
parent6d54b6ac7d5744e1f59d784c8e020d632d2959a3
gh-143547: Fix PyErr_FormatUnraisable() fallback (#143557)

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.
Lib/test/test_sys.py
Misc/NEWS.d/next/Library/2026-01-08-14-53-46.gh-issue-143547.wHBVlr.rst [new file with mode: 0644]
Python/errors.c