Skip to content

Refactor asyncio tools tests to use structures from _remote_debugging directly #143955

Description

@johnslavik

The asyncio tools use structures from the _remote_debugging module.

In tests we currently reimplement these structures:

FrameInfo = namedtuple('FrameInfo', ['funcname', 'filename', 'lineno'])
CoroInfo = namedtuple('CoroInfo', ['call_stack', 'task_name'])
TaskInfo = namedtuple('TaskInfo', ['task_id', 'task_name', 'coroutine_stack', 'awaited_by'])
AwaitedInfo = namedtuple('AwaitedInfo', ['thread_id', 'awaited_by'])

In GH-142394, the upstream structures from _remote_debugging were changed, but the reimplementations in the tests were not updated to match. This caused a regression from GH-143952 to sneak in.

Let's use structures from _remote_debugging directly, as it is currently done in test_external_inspection, to prevent any further unnoticed discrepancies.

cc @pablogsal

Linked PRs

Activity

  1. added
    testsTests in the Lib/test dir
    type-refactorCode refactoring (with no changes in behavior)
    on Jan 17, 2026
  2. Kaushalt2004 commented on Jan 17, 2026

    @Kaushalt2004
    Contributor

    I will like to review this

  3. self-assigned this
    on Jan 18, 2026
  4. added a commit that references this issue on Apr 13, 2026
  5. added a commit that references this issue on Apr 14, 2026
  6. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-refactorCode refactoring (with no changes in behavior)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions