From 3109c47be8fc00df999c5bff01229a6b93513224 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Sun, 4 May 2025 23:33:37 +0200 Subject: gh-91048: Add filename and line number to external inspection routines (GH-133385) Signed-off-by: Pablo Galindo --- Lib/asyncio/tools.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/asyncio/tools.py') diff --git a/Lib/asyncio/tools.py b/Lib/asyncio/tools.py index 16440b594ad..6c1f725e777 100644 --- a/Lib/asyncio/tools.py +++ b/Lib/asyncio/tools.py @@ -27,6 +27,7 @@ def _index(result): for tid, tname, awaited in tasks: id2name[tid] = tname for stack, parent_id in awaited: + stack = [elem[0] if isinstance(elem, tuple) else elem for elem in stack] awaits.append((parent_id, stack, tid)) return id2name, awaits @@ -151,6 +152,7 @@ def build_task_table(result): ] ) for stack, awaiter_id in awaited: + stack = [elem[0] if isinstance(elem, tuple) else elem for elem in stack] coroutine_chain = " -> ".join(stack) awaiter_name = id2name.get(awaiter_id, "Unknown") table.append( -- cgit v1.2.3