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

[C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API) #84608

Closed
vstinner opened this issue Apr 28, 2020 · 6 comments
Closed
Labels
3.9 only security fixes topic-C-API

Comments

@vstinner
Copy link
Member

BPO 40428
Nosy @vstinner, @ZackerySpytz
PRs
  • bpo-40428: Remove PyTuple_ClearFreeList() function #19769
  • bpo-40428: Remove references to Py*_ClearFreeList in the docs #19783
  • bpo-40428: Cleanup free list part of C API Changes doc #19793
  • 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 = <Date 2020-04-29.00:29:40.535>
    created_at = <Date 2020-04-28.21:04:13.514>
    labels = ['expert-C-API', '3.9']
    title = '[C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)'
    updated_at = <Date 2020-04-29.14:56:34.216>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-04-29.14:56:34.216>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-29.00:29:40.535>
    closer = 'vstinner'
    components = ['C API']
    creation = <Date 2020-04-28.21:04:13.514>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40428
    keywords = ['patch']
    message_count = 6.0
    messages = ['367561', '367562', '367595', '367596', '367614', '367650']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'ZackerySpytz']
    pr_nums = ['19769', '19783', '19793']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40428'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    The following C functions are implementation details and should not be called directly:

    • PyAsyncGen_ClearFreeLists()
    • PyContext_ClearFreeList()
    • PyDict_ClearFreeList()
    • PyFloat_ClearFreeList()
    • PyFrame_ClearFreeList()
    • PyList_ClearFreeList()
    • PySet_ClearFreeList()
    • PyTuple_ClearFreeList()

    To call them all at once, simply call explicitly PyGC_Collect().

    Attached PR move these functions to the internal C API and stop to export them.

    @vstinner vstinner added 3.9 only security fixes topic-C-API labels Apr 28, 2020
    @vstinner vstinner changed the title [C API] Move PyXXX_ClearFreeLists() functions to the internal C API [C API] Remove PyTuple_ClearFreeList() function Apr 28, 2020
    @vstinner vstinner changed the title [C API] Remove PyTuple_ClearFreeList() function [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API) Apr 28, 2020
    @vstinner
    Copy link
    Member Author

    Only PyTuple_ClearFreeList() was exported by PC/python3.def.

    @vstinner
    Copy link
    Member Author

    New changeset ae00a5a by Victor Stinner in branch 'master':
    bpo-40428: Remove PyTuple_ClearFreeList() function (GH-19769)
    ae00a5a

    @vstinner
    Copy link
    Member Author

    Note: I created this issue while working on bpo-40421, when I moved PyFrame_ClearFreeList() definition from Include/frameobject.h to Include/cpython/frameobject.h.

    @vstinner
    Copy link
    Member Author

    New changeset bb4a585 by Zackery Spytz in branch 'master':
    bpo-40428: Remove references to Py*_ClearFreeList in the docs (GH-19783)
    bb4a585

    @vstinner
    Copy link
    Member Author

    New changeset 9a8c131 by Victor Stinner in branch 'master':
    bpo-40428: Cleanup free list part of C API Changes doc (GH-19793)
    9a8c131

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes topic-C-API
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant