-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ #141171
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
base: main
Are you sure you want to change the base?
gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ #141171
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
_abc._abc_subclasscheckhas very poor performance and (I think) a memory leak #92810Alternative implementation of #131914 which doesn't modify class attributes on every
__subclasscheck__call. Instead it checks in__new__does current class havedef __subclasses(cls)overriden, and if so, enables casefor scls in cls.__subclasses__(), which is disabled by default.