PyO3 / pyo3

Rust bindings for the Python interpreter
https://pyo3.rs
Other
11.47k stars 694 forks source link

pypy/graalpy: set `Py_LIMITED_API` when `abi3` requested #4237

Closed davidhewitt closed 3 weeks ago

davidhewitt commented 4 weeks ago

Inspired by the CI failure attempting to merge #4194

This PR changes the abi3 builds on PyPy and GraalPy so that if the abi3 feature is set they will still set the Py_LIMITED_API config.

Technically speaking this is a bit pointless because neither PyPy nor GraalPy support the abi3 stable ABI, but it makes it easier for us to reason about feature combinations because this way when the abi3 feature is set we always build PyO3 to only use the limited API.

I think these same changes would also make sense with #2865 because then the base cfg of the limited API would be the exact same code regardless of what interpreter implementation we're running on.