Skip to content

Conversation

@dolfinus
Copy link

@dolfinus dolfinus commented Nov 6, 2025

Alternative implementation of #131914 which doesn't modify class attributes on every __subclasscheck__ call. Instead it checks in __new__ does current class have def __subclasses(cls) overriden, and if so, enables case for scls in cls.__subclasses__(), which is disabled by default.

@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2025

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 skip news label instead.

@dolfinus dolfinus changed the title Improvement/abc meta subclasscheck v2 gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ (v2) Nov 6, 2025
@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2025

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 skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2025

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 skip news label instead.

@dolfinus dolfinus changed the title gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ (v2) gh-92810: Reduce memory usage by ABCMeta.__subclasscheck__ Nov 6, 2025
@bedevere-app
Copy link

bedevere-app bot commented Nov 6, 2025

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 skip news label instead.

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.

1 participant