Closed
Description
We only have this left for _PyTrash_begin and _PyTrash_end:
~/Desktop/cpython2 main ✗
» ag _PyTrash_begin .
Misc/NEWS.d/3.9.0a5.rst
1217:PyThreadState attributes, but call new private _PyTrash_begin() and
Include/cpython/object.h
479:PyAPI_FUNC(int) _PyTrash_begin(PyThreadState *tstate, PyObject *op);
» ag _PyTrash_end .
Misc/NEWS.d/3.9.0a5.rst
1218:_PyTrash_end() functions which hide implementation details.
Include/cpython/object.h
480:PyAPI_FUNC(void) _PyTrash_end(PyThreadState *tstate);
Source:
cpython/Include/cpython/object.h
Lines 478 to 481 in 313b96e
They don't even have implementations. Looks like that they used to be called from Py_TRASHCAN_BEGIN and Py_TRASHCAN_END in 3.9:
cpython/Include/cpython/object.h
Lines 520 to 545 in 340a82d
But, they are unused since #117763 in ~3.11
What should we do?
- Nothing
- Remove them
- Raise deprecation warning when they are called (but they return
void, it would be hard to do)