Parsing failure [404]: f-string expression part cannot include a backslash
quantumpacket opened this issue · comments
0ri0n ☠ commented
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.
Kyle Into commented
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.