You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Print KeyboardInterrupt twice when ctrl+c in default asyncio REPL #139845
➜ cpython git:(main) ./python.exe -m asyncio
asyncio REPL 3.15.0a0 (heads/main-dirty:6f3dae0dc5, Oct 6 2025, 18:22:15) [Clang 17.0.0 (clang-1700.0.13.5)] on darwin
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> await asyncio.sleep(200)
^C
KeyboardInterrupt
>>>
KeyboardInterrupt
>>>
its normal in basic REPL
➜ cpython git:(main) PYTHON_BASIC_REPL=1 ./python.exe -m asyncio
asyncio REPL 3.15.0a0 (heads/main-dirty:6f3dae0dc5, Oct 6 2025, 18:22:15) [Clang 17.0.0 (clang-1700.0.13.5)] on darwin
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import asyncio
>>> await asyncio.sleep(200)
^C
KeyboardInterrupt
>>>
Activity
pythongh-139845: do not print twice in default asyncio REPL (pythonGH…
pythongh-139845: do not print twice in default asyncio REPL (python#1…
pythongh-139845: do not print twice in default asyncio REPL (pythonGH…
[3.13] gh-139845: do not print twice in default asyncio REPL (GH-139846…
[3.14] gh-139845: do not print twice in default asyncio REPL (GH-139846…