Skip to content

tp_bases of object is NULL: undocumented or unintentional behavior change in 3.12? #105020

Description

@rwgk

Documentation

See #103912 (comment) for full context.

Specific problem:

It appears tp_bases of object was an empty tuple in the past, but is now NULL, could that be? Is that intentional?

If intentional, could it please be documented? I think the behavior change is likely to trip up fair a number of people.

I looked in https://github.com/python/cpython/blob/edd0cb8e77d7b65f5a9c2c69dc81f9c4514878d5/Doc/whatsnew/3.12.rst but don't see tp_bases being mentioned there.

I also verified that the tp_bases == nullptr patch is still needed with current 3.12 HEAD (edd0cb8).

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.12only security fixesdocsDocumentation in the Doc dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions