Deprecate / remove `_Py` internal APIs from `pyo3-ffi`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
The main outcome I got from my stream today was that @encukou and @vstinner (and presumably the rest of the Core Devs) want to regard CPython C API symbols prefixed with _Py as internal APIs which don't carry any version stability (not even necessarily in the same Python minor version patch series).
I think this means that we should consider removing all such definitions with this _Py prefix from pyo3-ffi, or at the very least making users think very hard before they choose to use these, if there's a good reason for any of these to be exposed in PyO3.
I took some notes on stream about where we use these definitions in PyO3 itself, they're on my desktop PC along with a small patch which removes use of a couple, I'll aim to push both tomorrow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying the _Py definitions in pyo3-ffi and the places PyO3 uses them, then review the linked CPython C API context. The scope and completion criteria still need a decision: remove every definition, or retain selected APIs with an explicit warning and justification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100