-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
generate_tokens
tokenizes $
differently with Python 3.12 than earlier
#104802
Comments
It just makes it to the deadline. I think the docs can be updated later. |
If I understand the referenced comment correctly, |
Thanks for raising this with us! I can confirm that this is a expected side effect of the change. Docs are being worked on here: I am closing this issue as we will cover the docs part on the linked PR. |
Opened #104825 for the new line character |
…rror Based on PR review
…ingle cwf Don't add new error cases when refactoring; simply ensure that the code avoids an IndexError for the cases it attempts to handle
…ingle cwf Don't add new error cases when refactoring; simply ensure that the code avoids an IndexError for the cases it attempts to handle
I tested Python 3.12 beta 1 with Robot Framework and noticed that
tokenize.generate_tokens()
handles expressions containing$
differently than earlier. Earlier$
yieldedERRORTOKEN
but nowadays we getOP
:We support Python evaluation with special variables like
$var > 1
in Robot Framework data and this change breaks our tokenizing code. I didn't notice anything related in the release notes and decided to report this. If the change is intentional, we can easily update our code to handle also these semantics.Notice also that there's a small change with
TokenInfo.line
above. With Python 3.12 there's an additional\n
even though the original string didn't contain any newlines.The text was updated successfully, but these errors were encountered: