-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
starts to give SyntaxError
#105549
Comments
Please, see #105238 regarding the new tokenize In particular, see #105238 (comment) We could try to make it work to make your life easier but, we will not be able to preserve the previous output of
|
Would that work for you @sylee957 ? |
I have executed the failing test with this change and seems that it works:
|
I am a bit torn because making it work for this case is easy, but making it work for the other things you seem to need like @lysnikolaou what do you think? |
I don't know if this would help solving the problem, but might it not be possible to emit a new subclass of SyntaxError when an exception is raised during the tokenizing stage? Users of the tokenize module might then be in a position to attempt some targeted error recovery. |
We are already emmiting
I don't think this helps because most people are relying on super specific behavior for invalid code like emitting |
… 0-prefixed literals (pythonGH-105555) (cherry picked from commit b047fa5) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…w 0-prefixed literals (GH-105555) (#105602) Co-authored-by: Pablo Galindo Salgado <[email protected]>
Bug report
generate_tokens
gives error in python 3.12While in Python 3.11, it successfully returns some result
This is related to some issues in SymPy
sympy/sympy#25185
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: