Skip to content

Conversation

malsyned
Copy link
Contributor

@malsyned malsyned commented Sep 18, 2025

Even though the parent thread for ThreadExitedEvent won't change from Event to ThreadEvent until 17.0 is released, this actually makes type checking work better in practice for all released versions that support ThreadExitedEvent because at run time ThreadExitedEvent has the lone attribute, inferior_thread, that it would have inherited from ThreadEvent.

Fixes #14729

Upstream GDB issue:

Even though the parent thread for `ThreadExitedEvent` won't change from
`Event` to `ThreadEvent` until 17.0 is released, this actually makes
type checking work better in practice for all released versions that
support `ThreadExitedEvent` because at run time `ThreadExitedEvent` has
the lone attribute, `inferior_thread`, that it would have inherited from
`ThreadEvent`.

Upstream GDB issue:
* https://sourceware.org/bugzilla/show_bug.cgi?id=33444
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit 617f423 into python:main Sep 19, 2025
48 checks passed
Sign up for free to 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.

Superclass for gdb.ThreadExitedEvent should be gdb.ThreadEvent

2 participants