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

Remove PyUnicode_ClearFreeList() function #83077

Closed
vstinner opened this issue Nov 22, 2019 · 3 comments
Closed

Remove PyUnicode_ClearFreeList() function #83077

vstinner opened this issue Nov 22, 2019 · 3 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

BPO 38896
Nosy @vstinner
PRs
  • bpo-38896: Remove PyUnicode_ClearFreeList() function #17354
  • 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 2019-11-23.01:38:07.435>
    created_at = <Date 2019-11-22.18:41:13.478>
    labels = ['interpreter-core', '3.9']
    title = 'Remove PyUnicode_ClearFreeList() function'
    updated_at = <Date 2019-11-23.01:38:07.434>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-11-23.01:38:07.434>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-23.01:38:07.435>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2019-11-22.18:41:13.478>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38896
    keywords = ['patch']
    message_count = 3.0
    messages = ['357312', '357313', '357355']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['17354']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38896'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    The PyUnicode_ClearFreeList() function does nothing since Python 3.3, since this change:

    commit d63a3b8
    Author: Martin v. Löwis <martin@v.loewis.de>
    Date: Wed Sep 28 07:41:54 2011 +0200

    Implement PEP-393.
    

    I propose attached PR to remove the function.

    It seems like the function is part of the limited API and exported by PC/python3.def. But I don't see any usecase to explicitly clear the unicode freelist. Call gc.collect() to clear all free lists: no private API is needed.

    @vstinner vstinner added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Nov 22, 2019
    @vstinner
    Copy link
    Member Author

    See also similar issue, bpo-37340 "Remove PyMethod_ClearFreeList() and PyCFunction_ClearFreeList() functions".

    @vstinner
    Copy link
    Member Author

    New changeset d68b592 by Victor Stinner in branch 'master':
    bpo-38896: Remove PyUnicode_ClearFreeList() function (GH-17354)
    d68b592

    @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 interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant