gh-157378: Fix SyntaxError.offset for "Non-UTF-8 code" error - #157412
Conversation
pablogsal
left a comment
There was a problem hiding this comment.
LGTM!
Thanks a lot for the PR!
|
@pablogsal Auto-merge is currently blocked because |
|
Thanks @ashm-dev for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
Sorry, @ashm-dev and @pablogsal, I could not cleanly backport this to |
|
Sorry, @ashm-dev and @pablogsal, I could not cleanly backport this to |
|
GH-157489 is a backport of this pull request to the 3.14 branch. |
|
@ashm-dev can you backport it to 3.15 and 3.13 please? Follow #157412 (comment) |
|
@pablogsal I tried, but it doesn't work as-is on either branch. 3.15 doesn't have gh-156894 yet (GH-156926 is still open). Without it the offsets there are already correct, and this patch would actually make them wrong (3 -> 4 for 3.13 never got gh-151461, so this error has no offset there at all, nothing to fix. I'd skip 3.13. |
SyntaxError.offsetfor "Non-UTF-8 code starting with ..." when a non-ASCII character precedes the invalid byte #157378