Skip to content

Add colorization of exceptions in default sys.unraisablehook #134170

Open
@gry321

Description

@gry321

Bug report

Bug description:

There are no colored exceptions in atexit module. Like this:

import atexit
def foo():
    raise Exception('foo')
atexit.register(foo)
Exception ignored in atexit callback <function foo at 0x00000114C7D5C720>:
Traceback (most recent call last):
  File "...", line 3, in foo
    raise Exception('foo')
Exception: foo

Python 3.13.3
Windows 10

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions