[bpo-37433] Fix SyntaxError indicator printing too many spaces for multi-line strings#14433
[bpo-37433] Fix SyntaxError indicator printing too many spaces for multi-line strings#14433pablogsal merged 1 commit intopython:masterfrom
SyntaxError indicator printing too many spaces for multi-line strings#14433Conversation
|
/cc @benjaminp |
terryjreedy
left a comment
There was a problem hiding this comment.
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
vstinner
left a comment
There was a problem hiding this comment.
LGTM. But I would prefer that at least another core dev reviews the change.
pablogsal
left a comment
There was a problem hiding this comment.
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 <[email protected]>
|
@pablogsal nope, only 3.8+ |
|
Thank you very much @asottile for the fix :) |
…trings (GH-14433) (cherry picked from commit 5b94f35) Co-authored-by: Anthony Sottile <[email protected]>
https://bugs.python.org/issue37433