mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Issue #24867: Fix asyncio.Task.get_stack() for 'async def' coroutines
This commit is contained in:
parent
6707906ea5
commit
7ca6c55a4e
4 changed files with 56 additions and 1 deletions
|
@ -128,7 +128,11 @@ class Task(futures.Future):
|
|||
returned for a suspended coroutine.
|
||||
"""
|
||||
frames = []
|
||||
f = self._coro.gi_frame
|
||||
try:
|
||||
# 'async def' coroutines
|
||||
f = self._coro.cr_frame
|
||||
except AttributeError:
|
||||
f = self._coro.gi_frame
|
||||
if f is not None:
|
||||
while f is not None:
|
||||
if limit is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue