-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
pygettext
does not work with new f-strings (same quotes)
#113604
Comments
The print works, at least on Windows 3.13.0a2, but there does not seem to be a pygettext module. |
It fails because it currently does not support new tokens for f-strings: FSTRING_START, FSTRING_MIDDLE and FSTRING_END. Previously the tokenizer produced a single STRING token for f-string. It have to be parsed to the AST and processed recursively. |
It seems to me, that it works correct in 3.12 with this example.
So, there are two issues:
Also, the code for handling f-strings in 3.11 is no longer used and can be deleted. |
Fixed in #104402 |
Bug report
Bug description:
When using the new f-strings in 3.12 with the same quotes, pygettext failes.
Running pygettext returns the following error:
CPython versions tested on:
3.12
Operating systems tested on:
Linux, Windows
The text was updated successfully, but these errors were encountered: