Skip to content
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

_PyStaticType_Dealloc should not exist. #101603

Open
markshannon opened this issue Feb 6, 2023 · 2 comments
Open

_PyStaticType_Dealloc should not exist. #101603

markshannon opened this issue Feb 6, 2023 · 2 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@markshannon
Copy link
Member

This the twin to #96458, and the same reasoning applies.
If something is static it cannot be deallocated.

AFAICT, this clears subclasses of the static type, and doesn't deallocate the class.
The (class, subclass) relation for static types is an attribute of the interpreter not the class, so _PyStaticType_Dealloc needs to be renamed, at least.

_PyStaticType_Dealloc also allocates int objects, which is problematic during interpreter cleanup, as the MemoryError cache may be cleared first.

@markshannon markshannon added the type-bug An unexpected behavior, bug, or error label Feb 6, 2023
@ericsnowcurrently
Copy link
Member

CC @kumaraditya303

@ericsnowcurrently
Copy link
Member

Also see gh-101265.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants