Skip to content

Traceback colors are shifted when the line contains wide unicode characters #130273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
HarryLHW opened this issue Feb 18, 2025 · 1 comment
Open
Labels
stdlib Python modules in the Lib dir topic-repl Related to the interactive shell topic-unicode type-bug An unexpected behavior, bug, or error

Comments

@HarryLHW
Copy link
Contributor

HarryLHW commented Feb 18, 2025

Bug report

Bug description:

Image

In #28150, the carets' positions are compatible with wide unicode characters. I believe the colors should also be compatible.

CPython versions tested on:

3.13, CPython main branch

Operating systems tested on:

Windows, macOS

Linked PRs

@shenxianpeng
Copy link
Contributor

shenxianpeng commented Feb 18, 2025

Not sure if this borderline case 啊哈 = 1/0####### is necessary. If use Unicode to replace Chinese characters, there is no color shift.

Image

@encukou encukou added topic-repl Related to the interactive shell topic-unicode labels Feb 19, 2025
@picnixz picnixz added the stdlib Python modules in the Lib dir label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-repl Related to the interactive shell topic-unicode type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants