[3.14] gh-139845: do not print twice in default asyncio REPL (GH-139846) (#139859)

gh-139845: do not print twice in default asyncio REPL (GH-139846)
(cherry picked from commit a310b3a99d)

Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Miss Islington (bot) 2025-10-09 18:13:11 +02:00 committed by GitHub
parent 8761d6e644
commit 925625447f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -74,7 +74,8 @@ def callback():
return
except BaseException:
if keyboard_interrupted:
self.write("\nKeyboardInterrupt\n")
if not CAN_USE_PYREPL:
self.write("\nKeyboardInterrupt\n")
else:
self.showtraceback()
return self.STATEMENT_FAILED

View file

@ -0,0 +1 @@
Fix to not print KeyboardInterrupt twice in default asyncio REPL.