Skip to content

gh-133541: Handle SyntaxError raised by the tokenizer on user input #133606

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

Merged
merged 3 commits into from
May 8, 2025

Conversation

ambv
Copy link
Contributor

@ambv ambv commented May 7, 2025

I naively thought only tokenize.TokenError will be raised. SyntaxError raised from code calls is somewhat unexpected.

Sorry I missed it!

@pablogsal pablogsal merged commit b2fabce into python:main May 8, 2025
51 checks passed
@pablogsal pablogsal added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@miss-islington-app
Copy link

Thanks @ambv for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2025
…nput (pythonGH-133606)

(cherry picked from commit b2fabce)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
@bedevere-app
Copy link

bedevere-app bot commented May 8, 2025

GH-133709 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2025
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

Successfully merging this pull request may close these issues.

3 participants