Skip to content

[3.15] gh-156894: Fix the position of syntax errors which cover a range (GH-156901) - #156926

Merged
pablogsal merged 1 commit into
python:3.15from
serhiy-storchaka:backport-59a6913-3.15
Sep 24, 2026
Merged

pablogsal merged 1 commit into
python:3.15from
serhiy-storchaka:backport-59a6913-3.15

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

The callers of _PyTokenizer_syntaxerror_known_range() pass columns in bytes, but SyntaxError.offset and end_offset are columns in characters.
(cherry picked from commit 59a6913)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

pythonGH-156901)

The callers of _PyTokenizer_syntaxerror_known_range() pass columns in bytes,
but SyntaxError.offset and end_offset are columns in characters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 59a6913)

@pablogsal pablogsal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablogsal
pablogsal merged commit b4a2366 into python:3.15 Sep 24, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants