Skip to content

Commit 3fb9b99

Browse files
committed
asyncio: fix ag_frame/cr_frame typo in call graph
Fix a typo in asyncio call graph introspection. When handling objects with `ag_await`, the code incorrectly accesses `cr_frame`. Async generators expose their frame via `ag_frame`. This path seems effectively unreachable in normal asyncio execution; the change only corrects an attribute typo. Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
1 parent 05eab96 commit 3fb9b99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/asyncio/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _build_graph_for_future(
6262
coro = coro.cr_await
6363
elif hasattr(coro, 'ag_await'):
6464
# A native async generator or duck-type compatible iterator
65-
st.append(FrameCallGraphEntry(coro.cr_frame))
65+
st.append(FrameCallGraphEntry(coro.ag_frame))
6666
coro = coro.ag_await
6767
else:
6868
break

0 commit comments

Comments
 (0)