Skip to content

bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags #25504

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

Merged
merged 1 commit into from
Apr 21, 2021
Merged

bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags #25504

merged 1 commit into from
Apr 21, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 21, 2021

_PyType_GetModuleByDef() no longer checks if types are heap types.

_PyType_GetModuleByDef() must only be called on a heap type created
by PyType_FromModuleAndSpec() or on its subclasses.
type_ready_mro() ensures that a static type cannot inherit from a
heap type.

https://bugs.python.org/issue40137

_PyType_GetModuleByDef() no longer checks if types are heap types.

_PyType_GetModuleByDef() must only be called on a heap type created
by PyType_FromModuleAndSpec() or on its subclasses.
type_ready_mro() ensures that a static type cannot inherit from a
heap type.
@vstinner vstinner requested a review from markshannon as a code owner April 21, 2021 21:11
@vstinner vstinner merged commit d4aaa34 into python:master Apr 21, 2021
@vstinner vstinner deleted the type_getmodulebyref3 branch April 21, 2021 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants