-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
untokenize of specially crafted escaped characters does not round trip properly #125821
Labels
type-bug
An unexpected behavior, bug, or error
Comments
Sorry is a bit late here and I had a long day, but what I am missing here:
Same with a file:
Sorry if I am missing anything obvious. Can you provide a small reproducer I can run? |
Closing as duplicate of #125008 |
hah yep -- just checked my vod and I spent all the time waiting on a build only to rerun my system python 🤦 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
this small program does not roundtrip through
tokenize
/untokenize
-- it appears to mishandle the escaped quote as a\N{NAMED ESCAPE}
this is what it produces after a round of untokenization:
annoyingly,
tokenize_rt
suffers from a different related bug which is why I was investigating this to begin with. an aside, the handling of curly braces in 3.12+ tokenization is a huge pain!CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: