aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/tools.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2025-05-04 23:33:37 +0200
committerGitHub <noreply@github.com>2025-05-04 23:33:37 +0200
commit3109c47be8fc00df999c5bff01229a6b93513224 (patch)
tree8480fbd6ef885cf8b946c328736cb9b09ff8ae54 /Lib/asyncio/tools.py
parent6ce60f1574af458b2883bdbe5ab8986fba5bef5a (diff)
downloadcpython-3109c47be8fc00df999c5bff01229a6b93513224.tar.gz
cpython-3109c47be8fc00df999c5bff01229a6b93513224.zip
gh-91048: Add filename and line number to external inspection routines (GH-133385)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Diffstat (limited to 'Lib/asyncio/tools.py')
-rw-r--r--Lib/asyncio/tools.py2
1 files changed, 2 insertions, 0 deletions
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(