We should investigate to use the CPython Limited C API, and Stable ABI for the wheels. The main benefit would be that this allows building abi3 wheels, meaning we need one (or two for now, with free-threading) wheel per platform rather than N per platform with N the number of supported Python versions (https://docs.python.org/3/c-api/stable.html#stable-application-binary-interface)
xref #655 (comment)
Generally, I would assume this should be possible for us, since we don't have that much interaction with CPython C API (we mostly use cython to use the C API from GDAL), and this might also mean that performance impact might be acceptable. But this is something to try and test.
Scipy issue tracking this with some useful context and links: scipy/scipy#23791, copying a few bits:
- Cython: Supported fairly well in 3.1.x, and more improvements landing regularly. See docs at https://cython.readthedocs.io/en/latest/src/userguide/limited_api.html
- We can probably only start using this for Python 3.12. So short term (until that is our minimum version), that means we just still build separate wheels for cp310 and cp311.
- Performance impact should be measured (but as mentioned above, expected to not be a problem for us)
We should investigate to use the CPython Limited C API, and Stable ABI for the wheels. The main benefit would be that this allows building
abi3wheels, meaning we need one (or two for now, with free-threading) wheel per platform rather than N per platform with N the number of supported Python versions (https://docs.python.org/3/c-api/stable.html#stable-application-binary-interface)xref #655 (comment)
Generally, I would assume this should be possible for us, since we don't have that much interaction with CPython C API (we mostly use cython to use the C API from GDAL), and this might also mean that performance impact might be acceptable. But this is something to try and test.
Scipy issue tracking this with some useful context and links: scipy/scipy#23791, copying a few bits: