Repository navigation
Conversation
Saadia751
reviewed
Oct 14, 2026
Saadia751
left a comment
There was a problem hiding this comment.
I checked a three-generation class hierarchy with live instances of each class. The default search includes the base, child and grandchild; include_subtypes=False returns only the exact base type. An instance passed instead of a type still raises TypeError.
Checked 5775a037770b with standalone Python 3.12.14 checks (3 passing assertions). I haven't run the full upstream suite.
mahmoud
added a commit
that referenced
this pull request
Oct 25, 2026
Owner
|
Folded into #609 (see the PR description for credit). Thanks for the report and the repro. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change
get_all(Base)uses only objects that directly referenceBase, so it misses instances of subclasses even withinclude_subtypes=True(the default). Search GC-tracked objects when subtypes are requested. Retain the direct-reference optimization for exact-type searches and document the performance distinction.Validation: the base/child/grandchild regression fails on master and passes after the fix; full suite passes with 679 tests and 12 subtests.
The backstory
Earlier contribution from this account: #555. Found while checking that the documented subtype option returns instances across an ordinary three-level class hierarchy. No separate issue was filed.
AI assistance