-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
When computing the anchors on the traceback, results may be wrong if unicode chars are used #99103
Comments
Note: in another example it gets a bit worse and ends up throwing an internal failure:
Gives me:
|
Note: the
|
The second and third comment seem to be a duplicate of #98744, which I confirmed is now fixed on |
…against the current line
…against the current line
… line (GH-99145) Automerge-Triggered-By: GH:isidentical
…t the current line (pythonGH-99145) Automerge-Triggered-By: GH:isidentical. (cherry picked from commit 57be545) Co-authored-by: Batuhan Taskaya <[email protected]>
…current line (#99423) [3.11] gh-99103: Normalize specialized traceback anchors against the current line (GH-99145) Automerge-Triggered-By: GH:isidentical. (cherry picked from commit 57be545) Co-authored-by: Batuhan Taskaya <[email protected]>
Looks like this has been fixed and backported, thank you for reporting! |
Bug report
Consider the code below:
The output provided is:
Notice that for each additional unicode char, an additional `~' is added.
This seems to happen because when computing the anchors in
traceback._extract_caret_anchors_from_line_segment
the columns from the ast nodes generated inast.parse
seem to be related to bytes and not actual chars.Your environment
The text was updated successfully, but these errors were encountered: