mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
gh-134170: Add colorization to unraisable exceptions (#134183)
Default implementation of sys.unraisablehook() now uses traceback._print_exception_bltin() to print exceptions with colorized text. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
8943bb722f
commit
e8251dc0ae
11 changed files with 55 additions and 6 deletions
|
@ -14,7 +14,7 @@
|
|||
import unittest
|
||||
from test import support
|
||||
from test.support import (
|
||||
is_apple, is_apple_mobile, os_helper, threading_helper
|
||||
force_not_colorized, is_apple, is_apple_mobile, os_helper, threading_helper
|
||||
)
|
||||
from test.support.script_helper import assert_python_ok, spawn_python
|
||||
try:
|
||||
|
@ -353,6 +353,7 @@ def check_signum(signals):
|
|||
|
||||
@unittest.skipIf(_testcapi is None, 'need _testcapi')
|
||||
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||
@force_not_colorized
|
||||
def test_wakeup_write_error(self):
|
||||
# Issue #16105: write() errors in the C signal handler should not
|
||||
# pass silently.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue