[3.13] gh-131878: Handle top level exceptions in new pyrepl and prevent of closing it (GH-131910) (GH-133445)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
This commit is contained in:
Łukasz Langa 2025-05-05 17:20:54 +02:00 committed by GitHub
parent f371b23bab
commit 87b14c8f21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -163,3 +163,8 @@ def maybe_run_command(statement: str) -> bool:
except MemoryError:
console.write("\nMemoryError\n")
console.resetbuffer()
except SystemExit:
raise
except:
console.showtraceback()
console.resetbuffer()