cpython/Misc/NEWS.d/next/Core and Builtins/2023-11-26-21-30-11.gh-issu...

4 lines
254 B
ReStructuredText

Change coro.cr_frame/gen.gi_frame to return ``None`` after the coroutine/generator has been closed.
This fixes a bug where :func:`~inspect.getcoroutinestate` and :func:`~inspect.getgeneratorstate`
return the wrong state for a closed coroutine/generator.