-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
New repl closes CLI session on SyntaxError inside of the match statement #119555
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
Labels
3.13
bugs and security fixes
3.14
bugs and security fixes
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Comments
Seems to be fixed by one-liner: diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py
index 8ab4dab757..f6857c5967 100644
--- a/Lib/_pyrepl/simple_interact.py
+++ b/Lib/_pyrepl/simple_interact.py
@@ -96,7 +96,7 @@ def runsource(self, source, filename="<input>", symbol="single"):
item = wrapper([stmt])
try:
code = compile(item, filename, the_symbol)
- except (OverflowError, ValueError):
+ except (OverflowError, ValueError, SyntaxError):
self.showsyntaxerror(filename)
return False
I'm working on a pr. |
skirpichev
added a commit
to skirpichev/cpython
that referenced
this issue
May 25, 2024
pablogsal
pushed a commit
that referenced
this issue
May 29, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 29, 2024
…oloredConsole (pythonGH-119557) (cherry picked from commit 86d1a1a) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
pablogsal
pushed a commit
that referenced
this issue
May 29, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
bugs and security fixes
3.14
bugs and security fixes
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
At that point I'm in the system shell...
C.f.:
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: