FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-91048: Add filename and line number to external inspection routines by pablogsal · Pull Request #133385 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .py  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 2 additions & 0 deletions Lib/asyncio/tools.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@ambv This code just returns the fully qualified name. Play a bit with this and decide how we want to format this in the tool

awaits.append((parent_id, stack, tid))
return id2name, awaits

Expand Down Expand Up @@ -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(
Expand Down
Loading

Back | FazBrowse Home | New Git URL