-
Notifications
You must be signed in to change notification settings - Fork 614
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
Support PyPy #2096
Comments
Not prioritizing this immediately, but it should happen, and I'd welcome contributors and PRs around it. |
Might be a helpful data-point here - uv seems to select a wheel which it shouldn't when running with PyPy.
Example reproducer:
This wheel is unsupported (CPython, windows) and pip (pypy, macOS) would not consider it:
|
Can you just confirm that the Python in your virtualenv there is PyPy too? |
Yes, it is:
I created it with |
Thanks! |
Oh sorry, to be clear, we let the resolver use incompatible wheels during resolution for the purpose of fetching metadata. So this is fine and intended. The only problem would be if we then installed that wheel with |
Hmm, is that really fine? As far as I'm aware, there's no promise that the dependencies specified in the wheel metadata are correct for other environments. It should possible, at least in theory, for |
It's an assumption we make in dependency resolution. Poetry and other tools make the same assumption. It's not standardized or guaranteed. There's discussion around it here: https://discuss.python.org/t/lock-files-again-but-this-time-w-sdists/46593/274. There's also some data on it here: https://discuss.python.org/t/insights-into-how-poetry-lock-works-cross-platform/17846/23. At least on PyPI, there are about 700 (out of 523,405) that ship with wheels with different metadata. |
Would it be sufficiently complex to assume that each wheel has different metadata? |
Not really. It's just an optimization. |
Those discuss links are very informative, thanks. |
(If anyone's looking to continue discussing the wheel metadata usage, I humbly request that we do so in a new issue.) |
I noticed that this seems to work pretty well now (I recently installed a large project with >150 requirements under pypy) - what's left to do on this front? Or is it mostly about battle testing various edge cases (e.g. the metadata mismatch)? |
We might be missing some edge cases around the exact virtualenv executables that are created on various platforms, but I think this is good enough that we can close it, and follow-up on any remaining issues separately as they come up. |
(I consider PyPy supported.) |
Right now,
uv
does not officially support PyPy. It might work, and we've done a few things to enable it, like:implementation
field ofpyvenv.cfg
#1785But we're likely missing a bunch of stuff, like:
site-packages
and other directories onsysconfig
paths #2095uv venv
doesn't add PyPy executables #2092The text was updated successfully, but these errors were encountered: