Skip to content

C-API documentation ignores heap types and says type objects must never be deallocated #85956

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

Open
koubaa mannequin opened this issue Sep 15, 2020 · 1 comment
Open
Labels
docs Documentation in the Doc dir topic-C-API type-bug An unexpected behavior, bug, or error

Comments

@koubaa
Copy link
Mannequin

koubaa mannequin commented Sep 15, 2020

BPO 41790
Nosy @koubaa
PRs
  • bpo-41790: update error in documentation #22242
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-09-15.03:15:13.517>
    labels = ['type-bug', '3.10', 'docs']
    title = 'C-API documentation ignores heap types and says type objects must never be deallocated'
    updated_at = <Date 2020-09-15.16:51:11.709>
    user = 'https://github.com/koubaa'

    bugs.python.org fields:

    activity = <Date 2020-09-15.16:51:11.709>
    actor = 'ammar2'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2020-09-15.03:15:13.517>
    creator = 'koubaa'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41790
    keywords = []
    message_count = 1.0
    messages = ['376926']
    nosy_count = 2.0
    nosy_names = ['docs@python', 'koubaa']
    pr_nums = ['22242']
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41790'
    versions = ['Python 3.10']

    @koubaa
    Copy link
    Mannequin Author

    koubaa mannequin commented Sep 15, 2020

    The C-API documentation introduction contains an error:

    "Almost all Python objects live on the
    heap: you never declare an automatic or static variable of type
    :c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can be
    declared. The sole exception are the type objects; since these must never be
    deallocated, they are typically static :c:type:`PyTypeObject` objects."

    With heap types, PyTypeObject can be deallocated.

    @koubaa koubaa mannequin added the 3.10 only security fixes label Sep 15, 2020
    @koubaa koubaa mannequin assigned docspython Sep 15, 2020
    @koubaa koubaa mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error 3.10 only security fixes labels Sep 15, 2020
    @koubaa koubaa mannequin assigned docspython Sep 15, 2020
    @koubaa koubaa mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Sep 15, 2020
    @ammaraskar ammaraskar changed the title C-API documentation C-API documentation ignores heap types and says type objects must never be deallocated Sep 15, 2020
    @ammaraskar ammaraskar changed the title C-API documentation C-API documentation ignores heap types and says type objects must never be deallocated Sep 15, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @erlend-aasland erlend-aasland added topic-C-API and removed 3.10 only security fixes labels Jan 12, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir topic-C-API type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant