Skip to content

Commit 2cc18aa

Browse files
committed
add AsyncGeneratorType check
1 parent d076f69 commit 2cc18aa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/asyncio/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def capture_call_graph(
156156
try:
157157
while f is not None:
158158
# gh-156988: sync gen should not clear the call chain
159-
is_async = isinstance(f.f_generator, types.CoroutineType)
159+
is_async = isinstance(
160+
f.f_generator, (types.CoroutineType, types.AsyncGeneratorType))
160161
call_stack.append(FrameCallGraphEntry(f))
161162

162163
if is_async:

0 commit comments

Comments
 (0)