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

Build abi3 wheels for Python 3.11+ #144

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

effigies
Copy link
Contributor

Some initial playing around with getting Stable ABI builds to work. The benefit would be that if you publish wheels with cp3N-abi3, then any Python versions >= 3.N can install the same wheel without your having to do anything apart from fix compatibilities with the new Python versions.

Looking at the symbols indexed_gzip uses, PyObject_GetBuffer was only added to the stable ABI in 3.11, so that sets a lower bound on ABI3 wheels.

To get it to compile, I also needed to depend on cython/cython#5871. Leaving as draft for now, since this seems like a Bad Idea to code a dependency on in your pyproject.toml. abi3audit also complains about the use of Py_DECREF; I've removed them here, but we'd need to wait on cython/cython#6063 for it to be entirely clean.

I tried to modify your setup.py defensively, so that it would only attempt to build an ABI3 build if both Python and Cython were new enough. I have tested, and I'm able to install a wheel built with Python 3.11 on Python 3.12.

@effigies
Copy link
Contributor Author

Looks like this isn't going to play nicely with your tests until Cython's limited API fixes are released.

@pauldmccarthy
Copy link
Owner

@effigies No worries, thanks for looking into this.

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.

2 participants