mirror of
https://github.com/python/cpython.git
synced 2025-11-09 01:51:26 +00:00
gh-91048: Add filename and line number to external inspection routines (GH-133385)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
6ce60f1574
commit
3109c47be8
3 changed files with 547 additions and 163 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue