-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Closed
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
async def coroutine():
pass
coroutine().nope
$ echo 'Why would you print me?' > sys
$ python3.12 nowait.py
Traceback (most recent call last):
File ".../nowait.py", line 4, in <module>
coroutine().nope
AttributeError: 'coroutine' object has no attribute 'nope'
sys:1: RuntimeWarning: coroutine 'coroutine' was never awaited
Why would you print me?
Note the last line of the error. It is from the sys
file.
This does not go away when Python is invoked with -P
, -E
, or -I
.
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error