-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ #131914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dolfinus
wants to merge
38
commits into
python:main
Choose a base branch
from
dolfinus:improvement/ABCMeta_subclasscheck
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+358
−64
Open
Changes from 14 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
675bec5
gh-92810: Avoid O(n^2) complexity in ABCMeta.__subclasscheck__
dolfinus 701ecc9
gh-92810: Apply fixes
dolfinus 041f109
gh-92810: Apply fixes
dolfinus 9bc4385
gh-92810: Apply fixes
dolfinus 3d80b1e
gh-92810: Apply fixes
dolfinus b7603e0
gh-92810: Return __subclasses__clause back
dolfinus dd0d18c
gh-92810: Revert _abc.c changes
dolfinus 8d695fd
gh-92810: Fix linter errors
dolfinus a2650b6
gh-92810: Add recursive issubclass check to _abc.c
dolfinus 7afa5ea
gh-92810: Remove WeakKeyDictionary from _py_abc
dolfinus 57980d3
gh-92810: Add news entry
dolfinus bbaf38a
gh-92810: Fix news entry
dolfinus 6fc994d
gh-92810: Fixes after review
dolfinus b3b5895
gh-92810: Fixes after review
dolfinus 69c5038
gh-92810: Fixes after review
dolfinus dc1b6d5
gh-92810: Fixes after review
dolfinus cd097ab
gh-92810: Introduce FT wrappers for uint64_t atomics
dolfinus f3a21a7
gh-92810: Use FT atomic wrappers for ABC invalidation counter
dolfinus e24e815
gh-92810: Fix missing FT wrapper
dolfinus b723912
gh-92810: Address review fixes
dolfinus 0295846
Merge branch 'main' into improvement/ABCMeta_subclasscheck
dolfinus 16f39bd
gh-92810: Address review fixes
dolfinus 2dc6453
gh-92810: Add What's New entry
dolfinus 968766d
gh-92810: Fix What's New entry syntax
dolfinus a6e4461
gh-92810: Address review fixes
dolfinus 80d3281
gh-92810: Address review fixes
dolfinus ff38b9e
gh-92810: Properly reset recursion check
dolfinus 23df287
Merge branch 'main' into improvement/ABCMeta_subclasscheck
dolfinus 0bf7374
Merge branch 'main' into improvement/ABCMeta_subclasscheck
dolfinus d537859
Merge branch 'main' into improvement/ABCMeta_subclasscheck
dolfinus d17de08
Merge branch 'main' into improvement/ABCMeta_subclasscheck
dolfinus 858d4c0
gh-92810: Fix What's New entry
dolfinus 7b6a0dc
gh-92810: Improve nested subclass check performance
dolfinus 2f8f2b2
gh-92810: Automatically add ABC registry entries to cache
dolfinus b657cd6
gh-92810: Remove false fastpath
dolfinus 854f2f6
Merge branch 'python:main' into improvement/ABCMeta_subclasscheck
dolfinus c4fe83a
gh-92810: Improve test_custom_subclasses
dolfinus 84c5893
gh-92810: Improve test_custom_subclasses
dolfinus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Core_and_Builtins/2025-06-13-17-22-34.gh-issue-92810.Tb6x6C.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Reduce memory usage by :meth:`~type.__subclasscheck__` | ||
dolfinus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| for :class:`abc.ABCMeta` and large class trees. | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.