Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:

I think the PR fixed one case, but the other case (when coro is kept around) 
still fails an assertion:

Python 3.11.0a2+ (heads/main:734ed35383, Nov 29 2021, 19:29:25) [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\multiply\Objects\frameobject.c, line 689

Perhaps there should be some sort of backport as well?

----------
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45813>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to