Skip to content

[3.9] bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054)#21190

Merged
pablogsal merged 1 commit into
python:3.9from
pablogsal:backport-1f0f4ab-3.9
Jun 28, 2020
Merged

[3.9] bpo-41076: Pre-feed the parser with the f-string expression location (GH-21054)#21190
pablogsal merged 1 commit into
python:3.9from
pablogsal:backport-1f0f4ab-3.9

Conversation

@pablogsal

@pablogsal pablogsal commented Jun 27, 2020

Copy link
Copy Markdown
Member

This commit changes the parsing of f-string expressions with the new parser. The parser gets pre-fed with the location of the expression itself (not the f-string, which was what we were doing before). This allows us to completely skip the shifting of the AST nodes after the parsing is completed..
(cherry picked from commit 1f0f4ab)

Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com

https://bugs.python.org/issue41076

Automerge-Triggered-By: @pablogsal

…ation (pythonGH-21054)

This commit changes the parsing of f-string expressions with the new parser. The parser gets pre-fed with the location of the expression itself (not the f-string, which was what we were doing before). This allows us to completely skip the shifting of the AST nodes after the parsing is completed..
(cherry picked from commit 1f0f4ab)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@lysnikolaou

Copy link
Copy Markdown
Member

Shouldn't this have been merged by now?

@pablogsal

Copy link
Copy Markdown
Member Author

Shouldn't this have been merged by now?

No because it only works when a core dev approves it (I cannot approve my own PR) but I always forget about that 😓

@pablogsal pablogsal merged commit dab533d into python:3.9 Jun 28, 2020
@lysnikolaou

Copy link
Copy Markdown
Member

Shouldn't this have been merged by now?

No because it only works when a core dev approves it (I cannot approve my own PR) but I always forget about that 😓

Got it.

@pablogsal pablogsal deleted the backport-1f0f4ab-3.9 branch May 19, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants