Skip to content

Conversation

@johnslavik
Copy link
Member

@johnslavikjohnslavik commented Jan 17, 2026

@aisk
Copy link
Contributor

aisk commented Jan 17, 2026

Hi, I'm wondering if we can add some tests to ensure we don't break this again in the future?

@johnslavikjohnslavik marked this pull request as draft January 17, 2026 07:00
@johnslavik
Copy link
MemberAuthor

Something's very wrong here. On it.

@johnslavik
Copy link
MemberAuthor

johnslavik commented Jan 17, 2026

Oh, okay. We have tests for tools but we don't import structures from _remote_debugging. Instead we have our own:

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'])

CC @kumaraditya303

@johnslavik
Copy link
MemberAuthor

OK I guess that's it for the fix itself!

@johnslavikjohnslavik marked this pull request as ready for review January 17, 2026 07:16
@johnslavik
Copy link
MemberAuthor

johnslavik commented Jan 17, 2026

We'd want to keep these structures in sync later (we also don't have .opcode in FrameInfo in tests for instance).
I'll check the remote debugging tests in regard to how they manage these structures.

@johnslavik
Copy link
MemberAuthor

OK, it's not a problem. We would just have to pass sequences and we could use original structures.

>>> from _remote_debugging import FrameInfo >>> FrameInfo(range(4)) _remote_debugging.FrameInfo(filename=0, location=1, funcname=2, opcode=3)

@johnslavik
Copy link
MemberAuthor

We'd want to keep these structures in sync later (we also don't have .opcode in FrameInfo in tests for instance). I'll check the remote debugging tests in regard to how they manage these structures.

See GH-143955.

Copy link
Member

@pablogsalpablogsal left a comment

Choose a reason for hiding this comment

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

Great catch! In retrospective this indeed was doomed to happen so I am glad that we are looking at this

@pablogsalpablogsal merged commit 63cc125 into python:mainJan 18, 2026
51 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@johnslavik@aisk@pablogsal