This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Remove PyUnicode_ClearFreeList() function
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords: patch

Created on 2019-11-22 18:41 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17354 merged vstinner, 2019-11-22 18:45
Messages (3)
msg357312 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-22 18:41
The PyUnicode_ClearFreeList() function does nothing since Python 3.3, since this change:

commit d63a3b8beb4a0841cb59fb3515347ccaab34b733
Author: Martin v. Löwis <>
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.
msg357313 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-22 18:44
See also similar issue, bpo-37340 "Remove PyMethod_ClearFreeList() and PyCFunction_ClearFreeList() functions".
msg357355 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-23 01:30
New changeset d68b592dd67cb87c4fa862a8d3b3fd0a7d05e113 by Victor Stinner in branch 'master':
bpo-38896: Remove PyUnicode_ClearFreeList() function (GH-17354)
Date User Action Args
2022-04-11 14:59:23adminsetgithub: 83077
2019-11-23 01:38:07vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-11-23 01:30:52vstinnersetmessages: + msg357355
2019-11-22 18:45:00vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request16839
2019-11-22 18:44:54vstinnersetmessages: + msg357313
2019-11-22 18:41:13vstinnercreate