-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
# Add a code block here, if required
➜ cpython git:(main) ./python.exe -m asyncio
asyncio REPL 3.15.0a0 (heads/hy/close_new_repl_error_mess:b194f8fae6, Sep 12 2025, 19:50:01) [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
>>> breakpoint()
> <python-input-0>(1)<module>()
(Pdb) n
--Return--
> <python-input-0>(1)<module>()->None
(Pdb) n
> /Users/yihong/repos/cpython/Lib/asyncio/__main__.py(57)callback()
-> if not inspect.iscoroutine(coro):
(Pdb) n
> /Users/yihong/repos/cpython/Lib/asyncio/__main__.py(58)callback()
-> future.set_result(coro)
(Pdb)
then type n
twice the terminal will boom

CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Todo