This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, Mark.Shannon, asvetlov, terry.reedy, xxm, yselivanov
Date 2021-11-21.19:56:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637524583.03.0.818665979174.issue45813@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-11-21 19:56:23Dennis Sweeneysetrecipients: + Dennis Sweeney, terry.reedy, asvetlov, Mark.Shannon, yselivanov, xxm
2021-11-21 19:56:23Dennis Sweeneysetmessageid: <1637524583.03.0.818665979174.issue45813@roundup.psfhosted.org>
2021-11-21 19:56:23Dennis Sweeneylinkissue45813 messages
2021-11-21 19:56:22Dennis Sweeneycreate