classification
Title: [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)
Type: Stage: resolved
Components: C API Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, vstinner
Priority: normal Keywords: patch

Created on 2020-04-28 21:04 by vstinner, last changed 2020-04-29 14:56 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19769 closed vstinner, 2020-04-28 21:18
PR 19783 merged ZackerySpytz, 2020-04-29 02:06
PR 19793 merged vstinner, 2020-04-29 14:21
Messages (6)
msg367561 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-28 21:04
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.
msg367562 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-28 21:19
Only PyTuple_ClearFreeList() was exported by PC/python3.def.
msg367595 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-29 00:29
New changeset ae00a5a88534fd45939f86c12e038da9fa6f9ed6 by Victor Stinner in branch 'master':
bpo-40428: Remove PyTuple_ClearFreeList() function (GH-19769)
https://github.com/python/cpython/commit/ae00a5a88534fd45939f86c12e038da9fa6f9ed6
msg367596 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-29 00:30
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.
msg367614 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-29 02:41
New changeset bb4a585d903e7fe0a46ded8c2ee3f47435ad6a66 by Zackery Spytz in branch 'master':
bpo-40428: Remove references to Py*_ClearFreeList in the docs (GH-19783)
https://github.com/python/cpython/commit/bb4a585d903e7fe0a46ded8c2ee3f47435ad6a66
msg367650 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-29 14:56
New changeset 9a8c1315c3041fdb85d091bb8dc92f0d9dcb1529 by Victor Stinner in branch 'master':
bpo-40428: Cleanup free list part of C API Changes doc (GH-19793)
https://github.com/python/cpython/commit/9a8c1315c3041fdb85d091bb8dc92f0d9dcb1529
History
Date User Action Args
2020-04-29 14:56:34vstinnersetmessages: + msg367650
2020-04-29 14:21:03vstinnersetpull_requests: + pull_request19115
2020-04-29 02:41:59vstinnersetmessages: + msg367614
2020-04-29 02:06:05ZackerySpytzsetnosy: + ZackerySpytz

pull_requests: + pull_request19106
2020-04-29 00:30:34vstinnersetmessages: + msg367596
2020-04-29 00:29:40vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-04-29 00:29:24vstinnersetmessages: + msg367595
2020-04-28 21:19:38vstinnersetmessages: + msg367562
2020-04-28 21:18:57vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request19089
2020-04-28 21:16:35vstinnersettitle: [C API] Remove PyTuple_ClearFreeList() function -> [C API] Remove PyTuple_ClearFreeList() function (move it to the internal C API)
2020-04-28 21:16:15vstinnersettitle: [C API] Move PyXXX_ClearFreeLists() functions to the internal C API -> [C API] Remove PyTuple_ClearFreeList() function
2020-04-28 21:04:13vstinnercreate