Skip to content
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

Parsing failure [404]: f-string expression part cannot include a backslash #782

Open
quantumpacket opened this issue Aug 22, 2023 · 1 comment
Milestone

Comments

@quantumpacket
Copy link

Pyre Bug

Bug description
Using backslashes inside an f-string expression under Python 3.12 produces the following Pyre error:

Parsing failure [404]: f-string expression part cannot include a backslash

Reproduction steps

foo = ['1', '2', '3', '4']
print(f"{'\n'.join(foo)}")  # error for this line

Expected behavior
It should be able to parse the code and not produce an error as Python 3.12 supports backslashes in f-string expressions per PEP 701

I am using pyre-nightly PyPi package.

@kinto0 kinto0 added this to the 3.12 milestone Aug 22, 2023
@kinto0
Copy link
Contributor

kinto0 commented Aug 22, 2023

adding this to a milestone for 3.12. it will take some time for us to support all the 3.12 features. that being said, typechecking just uses the CPython parser so we probably just need to update to a newer version.

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

No branches or pull requests

2 participants