-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
[bpo-37433] Fix SyntaxError
indicator printing too many spaces for multi-line strings
#14433
Conversation
/cc @benjaminp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the example in the new test, I verified the problem and fix on Win 10.
I am not familiar enough with C and CPython C code to be sure that fix is exactly what is needed.
to explain a little better in words what's happening in this block:
|
d74e412
to
f0f85c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I would prefer that at least another core dev reviews the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I checked the examples provided and tok->multi_line_start
does not point anymore to random memory (the one that is there before the PyMem_REALLOC
happens).
I would suggest adding more tests for this that do not involve f-strings, maybe in a different PR.
@asottile Does this affect 3.7? |
Thanks @asottile for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-15001 is a backport of this pull request to the 3.8 branch. |
…trings (pythonGH-14433) (cherry picked from commit 5b94f35) Co-authored-by: Anthony Sottile <asottile@umich.edu>
@pablogsal nope, only 3.8+ |
Thank you very much @asottile for the fix :) |
https://bugs.python.org/issue37433