Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

colors are missing on (Base)ExceptionGroup tracebacks in the pyrepl #125593

Closed
Assignees
wrongnull
Labels
3.13bugs and security fixes3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error
@graingert

Description

@graingert

Bug description:

importsysclassInvalidFruitException(Exception):passdefeat_fruit(fruit):iffruit=="banana":raiseInvalidFruitException("no herbs please, only fruit")iffruit=="rock":raiseInvalidFruitException("too tough")defdemo_continue_loop():food= ["apple","rock","orange","banana"]exceptions= []try:fori,finenumerate(food):try:eat_fruit(f)exceptExceptionase:e.add_note(f"failed on loop{i=}{f=}")exceptions.append(e)ifexceptions:raiseExceptionGroup("multiple errors eating food",exceptions)finally:delexceptions# no refcycles please!defmain():demo_continue_loop()return0if__name__=="__main__":sys.exit(main())

here's the output:
https://asciinema.org/a/681263
681263

I'd expect theeat_fruit() parts to be highlighted in red

CPython versions tested on:

3.13, 3.14

Operating systems tested on:

Linux, macOS

This was added in#112730 but it looks like ExceptionGroups were missed

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp