You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of get stack on Task is looking for two attribute [1]: "cr_frame" for coroutines, "gi_frame" for generators (legacy coroutines). However, PyAsyncGenObject provides none of them but "ag_frame" [2].
Activity
lidizheng commentedon Feb 26, 2020
This issue exists since 3.6.
The implementation of get stack on Task is looking for two attribute [1]: "cr_frame" for coroutines, "gi_frame" for generators (legacy coroutines). However, PyAsyncGenObject provides none of them but "ag_frame" [2].
Fix PR: #18669
A simple reproduce:
I found this in my project I want to view who created the Tasks.
[1]
cpython/Lib/asyncio/base_tasks.py
Line 27 in 21da76d
[2]
cpython/Objects/genobject.c
Line 1329 in 21da76d
asvetlov commentedon Mar 2, 2020
New changeset 4482337 by Lidi Zheng in branch 'master':
bpo-39764: Make Task.get_stack accept ag_frame (bpo-18669)
4482337
miss-islington commentedon Mar 2, 2020
New changeset 43932dc by Miss Islington (bot) in branch '3.8':
bpo-39764: Make Task.get_stack accept ag_frame (GH-18669)
43932dc