Closed
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