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

Investigate using Py_LIMITED_API to reduce release size #1219

Open
jlaine opened this issue Nov 3, 2023 · 4 comments
Open

Investigate using Py_LIMITED_API to reduce release size #1219

jlaine opened this issue Nov 3, 2023 · 4 comments
Labels

Comments

@jlaine
Copy link
Member

jlaine commented Nov 3, 2023

Currently our release size is around 1GB due to the large number of wheels we produce. This has started being a problem since we have hit the default 10 GB limit on PyPI, which is currently holding up release 11.0.0, see pypi/support#3324.

Cython 3 has added support for Python's limited API - which means a single wheel can cover multiple Python versions. This would greatly reduce the size of our releases and possibly speed up CI build times too.

@jlaine jlaine added the build label Nov 3, 2023
@WyattBlue
Copy link
Member

Cython does not support Py_LIMITED_API. See still open issue

@WyattBlue WyattBlue closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@jlaine
Copy link
Member Author

jlaine commented Nov 14, 2023

@jlaine jlaine reopened this Nov 14, 2023
@da-woods
Copy link

da-woods commented Dec 9, 2023

To clarify - it's very preliminary in Cython 3. Some very trivial test examples will compile and run in with Py_LIMITED_API but most won't.

Cython 3.1 should be better - it'll still be fairly experimental but there's a decent chance things will work (although no promises). The main limitation is memoryviews which aren't possible to support on Python <3.11. No info on likely release dates of Cython 3.1 but I'd hold off on spending much time on this until then.

There may also be some limitations in build tooling that you've have to work around (e.g. setuptools doesn't give compiled files the right version tags)

@jlaine
Copy link
Member Author

jlaine commented Dec 27, 2023

@da-woods thanks for investigating regarding the current state of Cython.

The tags issue is trivial to work around, i have for instance done so for the "aioquic" package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants