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

RFC: remove private _Py symbols from pyo3-ffi #4379

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Jul 26, 2024

Closes #3762

This PR removes (as much as possible) all FFI functions and constants which start with _Py. Given that the guidance in #3762 from the CPython team is that we shouldn't be using these symbols (except in some cases where they are ABI implementation details) I have proceeded to remove them rather than deprecate. In the cases where we need to use them for implementations I removed the pub from the symbol definition so that pyo3-ffi retains use of the symbol without re-exporting.

Marked as draft for now as I need to finish off later; if we agree that this is a good idea then I will:

  • Split this out into smaller PRs which are individually reviewable
  • Add a migration guide entry to explain to users that some FFI symbols have been removed without deprecation
  • Update Architecture.md / Contributing.md to note that we don't expose these symbols.

@alex
Copy link
Contributor

alex commented Jul 26, 2024

I'm supportive of getting rid of _Py stuff to the maximum extent possible -- they're basically compatibility hazards that reduce the chances a given version of pyo3 will work on a future Python.

I'm even more supportive of splitting these out 😂

To the extent there's stuff we need that doesn't have a public (or abi3) API, we should definitely make sure to turn them all into upstream bug reports.

@davidhewitt davidhewitt force-pushed the remove-private-symbols branch 2 times, most recently from d34ef60 to 11d3f0c Compare August 17, 2024 13:19
Copy link

codspeed-hq bot commented Aug 17, 2024

CodSpeed Performance Report

Merging #4379 will not alter performance

Comparing davidhewitt:remove-private-symbols (11d3f0c) with main (144b199)

Summary

✅ 75 untouched benchmarks

Sign up for free to 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.

Deprecate / remove _Py internal APIs from pyo3-ffi
2 participants