Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jun 23, 2021

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.

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
38965ec and in Python 3.10 by commit
ed1a5a5 to hide implementation
details.

https://bugs.python.org/issue39947

@vstinner
Copy link
MemberAuthor

cc @iritkatriel@encukou

Comment on lines +1 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you say which ones?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.

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 38965ec and in Python 3.10 by commit ed1a5a5 to hide implementation details.
@vstinnervstinner requested a review from a team as a code ownerJune 23, 2021 10:34
@vstinner
Copy link
MemberAuthor

I updated the PR to list the 4 removed functions in the NEWS entry and I also updated the stable ABI.

@vstinner
Copy link
MemberAuthor

@encukou: Would you mind to review the updated PR? It now removes the removed functions from the stable ABI.

@vstinner
Copy link
MemberAuthor

Merged, thanks for the review @encukou.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vstinner@encukou@the-knights-who-say-ni@bedevere-bot