Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39947: Remove old private trashcan C API functions #26869

Merged
merged 1 commit into from Jun 23, 2021

Conversation

@vstinner
Copy link
Member

@vstinner vstinner 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
Member Author

@vstinner vstinner commented Jun 23, 2021

Remove 4 private trashcan C API 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.
Comment on lines +1 to +4

This comment has been minimized.

@encukou

encukou Jun 23, 2021
Member

Could you say which ones?

This comment has been minimized.

@vstinner

vstinner Jun 23, 2021
Author Member

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.
@vstinner vstinner force-pushed the vstinner:trashcan branch from bc650a3 to fa3b514 Jun 23, 2021
@vstinner vstinner requested a review from python/windows-team as a code owner Jun 23, 2021
@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 23, 2021

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

@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 23, 2021

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

@vstinner vstinner merged commit db532a0 into python:main Jun 23, 2021
13 checks passed
13 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL
Details
@github-actions
Address sanitizer Address sanitizer
Details
Azure Pipelines PR #20210623.18 succeeded
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 39947 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
@vstinner vstinner deleted the vstinner:trashcan branch Jun 23, 2021
@vstinner
Copy link
Member Author

@vstinner vstinner commented Jun 23, 2021

Merged, thanks for the review @encukou.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants