]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39947: Remove old private trashcan C API functions (GH-26869)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Jun 2021 13:51:47 +0000 (15:51 +0200)
committerGitHub <noreply@github.com>
Wed, 23 Jun 2021 13:51:47 +0000 (15:51 +0200)
commitdb532a09990c837ec1348e6e6bd2719f5d4a8216
treef5b93ef99f6faba98468bad23f53bcde2dda0369
parent2a396d65b8e63300ff05e217adacf0765c502ba3
bpo-39947: Remove old private trashcan C API functions (GH-26869)

Remove 4 C API private trashcan functions which were only kept for
the backward compatibility of the stable ABI with Python 3.8 and
older, since the trashcan API was not usable with the limited C API
on Python 3.8 and older. The trashcan API was excluded from the
limited C API in Python 3.9.

Removed functions:

* _PyTrash_deposit_object()
* _PyTrash_destroy_chain()
* _PyTrash_thread_deposit_object()
* _PyTrash_thread_destroy_chain()

The trashcan C API was never usable with the limited C API, since old
trashcan macros accessed directly PyThreadState members like
"_tstate->trash_delete_nesting", whereas the PyThreadState structure
is opaque in the limited C API.

Exclude also the PyTrash_UNWIND_LEVEL constant from the C API.

The trashcan C API was modified in Python 3.9 by commit
38965ec5411da60d312b59be281f3510d58e0cf1 and in Python 3.10 by commit
ed1a5a5baca8f61e9a99c5be3adc16b1801514fe to hide implementation
details.
Include/cpython/object.h
Misc/NEWS.d/next/C API/2021-06-23-10-31-45.bpo-39947.je_HMo.rst [new file with mode: 0644]
Misc/stable_abi.txt
Objects/object.c
PC/python3dll.c