-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
3.11 regression: traceback.format_list raises UnicodeDecodeError in certain scenarios #98744
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
Comments
Current main (d578aae) also has the same issue. |
Also cc @iritkatriel (related to source positions -- in this case a source position in the middle of a UTF-8 codepoint). |
It seems like we are not mirroring the behaviour from the C implementation, which uses |
@isidentical: I was just looking at this as well, and there is also an off-by-one difference between this and the C implementation. |
@mdboom you are right! That is also an issue (in the C Implementation, we do a lengths check to not to overflow; although it is not necessary here. Another problem is the caret positions which actually might differ from node's offsets). Both should now be resolved with #98824. Thanks for catching it. |
…back module (pythonGH-98824). (cherry picked from commit c0f2a5e) Co-authored-by: Batuhan Taskaya <[email protected]>
…odule (#98850) Co-authored-by: Batuhan Taskaya <[email protected]>
Should be fixed now, thanks everyone! |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Take the following piece of code:
With Python 3.10 and earlier versions, executing a file with this code produces:
With Python 3.11, a
UnicodeDecodeError
is raised instead:Your environment
The text was updated successfully, but these errors were encountered: