Message406737
Even without garbage-collecting the coroutine, we get a failed assertion in debug mode (but no crash with the assertion removed):
Python 3.11.0a2+ (heads/main:c8c21bdd19, Nov 21 2021, 13:58:01) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> async def f():
... pass
...
>>> coro = f()
>>> frame = coro.cr_frame
>>> frame.clear()
<stdin>:1: RuntimeWarning: coroutine 'f' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Assertion failed: f->f_frame->generator == NULL, file C:\Users\sween\Source\Repos\cpython2\cpython\Objects\frameobject.c, line 705 |
|
Date |
User |
Action |
Args |
2021-11-21 19:56:23 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, terry.reedy, asvetlov, Mark.Shannon, yselivanov, xxm |
2021-11-21 19:56:23 | Dennis Sweeney | set | messageid: <1637524583.03.0.818665979174.issue45813@roundup.psfhosted.org> |
2021-11-21 19:56:23 | Dennis Sweeney | link | issue45813 messages |
2021-11-21 19:56:22 | Dennis Sweeney | create | |
|