-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
ast gets the wrong column information for interpolated code in multiline f-strings #94869
Labels
type-bug
An unexpected behavior, bug, or error
Comments
@pablogsal : thoughts? |
Yeah, this looks like a bug. I will take a look after EuroPython |
seems to have been caused by bfc413c |
pablogsal
added a commit
to pablogsal/cpython
that referenced
this issue
Jul 16, 2022
…-string ast nodes
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 16, 2022
…-string ast nodes (pythonGH-94895) (cherry picked from commit 2e9da8e) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jul 16, 2022
…-string ast nodes (pythonGH-94895) (cherry picked from commit 2e9da8e) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal
added a commit
that referenced
this issue
Jul 16, 2022
Unfortunately 3.9 is in security fixes only so we cannot backport this fix :( |
pablogsal
added a commit
that referenced
this issue
Jul 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
When parsing multiline f-strings, e.g.
the ast has the wrong column information for
test
. Here's the diff between 3.9.12 (lhs, gets it wrong) and 3.9.1 (gets it right).Your environment
Tested on a variety of python versions (on linux); 3.9.1 gets it right, it's wrong in 3.9.2 and has the same wrong value all the way to 3.9.12. The offset seems related to the start column of the opening triple quotes. I went through previous f-string parsing bugs but this does not look like a duplicate of any of them.
The text was updated successfully, but these errors were encountered: