Skip to content

Commit 1312fb5

Browse files
committed
pythongh-91048: Add filename and line number to external inspection routines
1 parent 8eaaf16 commit 1312fb5

File tree

3 files changed

+542
-161
lines changed

3 files changed

+542
-161
lines changed

Lib/asyncio/tools.py

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def _index(result):
2727
for tid, tname, awaited in tasks:
2828
id2name[tid] = tname
2929
for stack, parent_id in awaited:
30+
stack = [elem[0] if isinstance(elem, tuple) else elem for elem in stack]
3031
awaits.append((parent_id, stack, tid))
3132
return id2name, awaits
3233

@@ -151,6 +152,7 @@ def build_task_table(result):
151152
]
152153
)
153154
for stack, awaiter_id in awaited:
155+
stack = [elem[0] if isinstance(elem, tuple) else elem for elem in stack]
154156
coroutine_chain = " -> ".join(stack)
155157
awaiter_name = id2name.get(awaiter_id, "Unknown")
156158
table.append(

0 commit comments

Comments
 (0)