-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Ship wheels for PyPy #5806
Comments
Unfortunately PyPy has no stable ABI (except within a release series, with tags like pp73). There was some conversation about this in another open issue (#5696 (comment)). It's not really feasible for us to maintain wheel build infrastructure for an ever-increasing set of PyPys and we're reluctant to only ship wheels on the latest PyPy since that results in significant confusion when we drop a wheel build or when PyPy does a new release and we don't immediately ship a wheel for it. We're definitely not opposed to wheels here, but PyPy probably needs to commit to some |
It would help if cryptography could keep a conservative MSRV. Distributions seem to be relatively willing to update Rust versions (eg. Debian stretch's Rust was updated to 1.41). That, paired with a slow-bumping MSRV should make installing a suitable Rust compiler easier way before any ABI commitment would happen. [edit: For my own CI needs at aiocoap I install Rust via rustup for the time being while the pypy containers don't ship a Rust 1.45] |
I agree, it would be helpful. The pyo3 crate requires a Rust 1.45 for some features like |
I have created PyO3/pyo3#1420 |
Thanks for the responses! I've opened a feature request for pypy to add a stable abi: https://foss.heptapod.net/pypy/pypy/-/issues/3397 |
The current situation is that it is no longer possible to build cryptography from source on most end-user platforms. This is unfortunate. Until PyPy gains a stable API, could cryptography distribute a single wheel for pypy3.7? I don't think this would cause much churn: right now pypy3.7 is really the only version that is viable (many projects have dropped support for python3.6, and there is no pypy3.8). New wheels do not have to be created for every PyPy release, only per-python-version. |
Which end-user platforms are missing? With latest release, PyCA cryptography builds with standard OS packages on most platforms except for Alpine 3.11, CentOS 7, Ubuntu 16.04, and some retro hardware. |
Ahh, sorry, I must have misunderstood the issue: I thought the problem was more widespread. |
Release 3.4.0 was not compatible with Rust < 1.45, which broke building on Debian stable and Alpine 3.12. With PyO3/pyo3#1420 and 3.4.5, Rust 1.41 is supported. 3.4.5 came out a week after 3.4.0. |
Will PyPy go to 7.4 (and therefore a pp74 tag) when they support Python 3.7? I'm not committing to anything, but want to be sure I understand what PyPy's current ABI looks like. Even without abi3 if it's stable within a major release series that's more manageable. |
Does PyPI even allow uploads of PyPy binary wheels? AFAIK PyPI blocks uploads for some wheel tags. |
PyPy supports python 3.7 with the
Yes, NumPy and others support it. |
Okay, if that's the situation then the burden of shipping a wheel here isn't incrementally huge. I'll look into this a bit. |
It looks like there's a bit of nuance here. |
Since they target different versions of python, they require different wheels, just like on CPython. However they both use the same underlying RPython/cpyext APIs, which is described by the In the distant past (two years ago), the binary API was not stable and so many point releases of the same version of python with PyPy would update the binary API, from If cryptography were to release both pypy3.6 and pypy3.7 wheels that would be great. But right now pypy3.7 is really the only version that is viable (many projects have dropped support for python3.6, and there is not yet a pypy3.8). I hope that once PyPy3.8 is released, PyPy will have a stable API so a single wheel will suffice for pypy3.8+. |
pypy{36,37}_pp73-manylinux20{10,14} wheels are now uploaded. They are part of our release process so they'll be automatically uploaded going forward. |
Thanks. I should have looked at the related issues before editoralizing about this, I apologize to @tiran for adding any stress on top of what must have been a very stressful couple of weeks. |
Thanks for your kind words. 🥇 |
@reaperhulk, is there an expectation of building and publishing PyPy wheels for macOS and Windows as well? Honestly, I don't even get to use PyPy since I use Qt wrappers, but I do try to help expand PyPy support by including it in test matrices of whatever projects I can. If needed, I might be able to find some time to make PR. |
I would suggest to hold off on macOS and Windows at least until the next release. There is a bug in macOS, and PyPy only provides a 32-bit windows version until the next release. People who want PyPy on macOS can get it (and I assume cryptography) via conda or homebrew. |
I did not see PyPy discussed on #5771 or #5799.
Background: PyMongo currently relies on cryptography for a number of optional features. We test PyPy on Debian 9.2 and unsurprisingly these tests now fail when attempting to install cryptography because rust is not available on our test machine. PyPy always builds cryptography at install time because there are no PyPy specific wheels:
I know we have a number of temporary options (pin to 3.3, use CRYPTOGRAPHY_DONT_BUILD_RUST) and we can fix this for real by installing rust >=1.45. However, are there plans to improve the PyPy story here? Is it possible to ship wheels for PyPy?
It might also be helpful to include a PyPy specific error message since upgrading pip will not help in this case.
The text was updated successfully, but these errors were encountered: