Since GH-142394 the asyncio debugging tools no longer work at all:
❯ ./python t.py ^Z [1]+ Stopped ./python t.py ❯ jobs -l [1]+ 873785 Stopped ./python t.py ❯ ./python -m asyncio ps 873785 |& tail -n 10 File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 180, in build_task_table id2name, _, _ = _index(result) ~~~~~~^^^^^^^^ File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 49, in _index internal_stack = [_format_stack_entry(frame) for frame in call_stack] ~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 30, in _format_stack_entry if elem.lineno == 0 and elem.filename == "": ^^^^^^^^^^^ AttributeError: '_remote_debugging.FrameInfo' object has no attribute 'lineno' ❯ ./python -m asyncio pstree 873785 |& tail -n 10 File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 155, in build_async_tree id2name, awaits, task_stacks = _index(result) ~~~~~~^^^^^^^^ File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 49, in _index internal_stack = [_format_stack_entry(frame) for frame in call_stack] ~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/home/bswck/Python/cpython/main/Lib/asyncio/tools.py", line 30, in _format_stack_entry if elem.lineno == 0 and elem.filename == "": ^^^^^^^^^^^ AttributeError: '_remote_debugging.FrameInfo' object has no attribute 'lineno'
CPython main branch
No response
I am surprised that we do not have any tests for it, we should definitely add tests.
Hm, I've gotten confused. We do have tests for tools.
gh-143952: Fix asyncio tools to work with the new remote debugging API (
pythongh-143952: Fix asyncio tools to work with the new remote debugg…
pythongh-143955: Use _remote_debugging structs directly in test_tools
Activity
kumaraditya303 commented on Jan 17, 2026
I am surprised that we do not have any tests for it, we should definitely add tests.
johnslavik commented on Jan 17, 2026
Hm, I've gotten confused. We do have tests for tools.
gh-143952: Fix asyncio tools to work with the new remote debugging API (
pythongh-143952: Fix asyncio tools to work with the new remote debugg…
pythongh-143955: Use _remote_debugging structs directly in test_tools