-
Notifications
You must be signed in to change notification settings - Fork 543
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
pip.parse
is installing a Py3.12 version of a (private-index) wheel even though we're using Py3.11
#1930
Comments
Yup, this is a know issue that would be fixed by #1917. Could you please try that one? I would also expect the wheel to be cp312 rather than py312 because the version numbers are specific to an implementation I think. I wonder if our implementation should error out in those cases. |
Oh sweet! I'll be able to test things tomorrow morning.
(Forgive me if you already know all of this - I'm writing it down mostly for my own sanity.) TL;DR: I too would expect the wheel to be The wheel filename is defined by PEP 491 as For pure wheels (which It's possible that whatever build process we're using to make For non-pure wheels, these lines end up calling functions from a vendored version of the
... Whoo, that was fun! I spent way too much time on that though, and while I learned a lot, I didn't find anything to say exactly why we're getting
Error out in cases where the python tag is Or are you talking about something else? Footnotes
|
This moves some of the code out of the `pip.bzl` extension and changes the layout of the code to prepare for multi-platform whl support. Summary: * parse_requirements: add whls and sdists attribute, so that we can use a function to populate the lists. Not sure if there is a better way to do this. * parse_requirements: add an extra code to ensure that we are handling the target platform filtering correctly. * select_whl: split the `select_whl` into `select_whls`, which filters the whls (this can be used later in multi-platform selects) and select_whl , which just is used get the most appropriate whl for the host platform. * Additionally fix the logic in `select_whl`, which would result in Python 3.12 wheels being selected on Python 3.11 interpreters because we were not taking into account the interpreter tag when doing the filtering. Fixes #1930
🐞 bug report
Affected Rule
pip.parse
Is this a regression?
I don't think so. Nothing on the Bazel or
rules_python
side of things have changed when this appeared.The bug appeared when our internal
foobar
package was updated from2.2.10
to2.2.12
.Description
pip.parse
is installing a Py3.12 version of a (private-index) wheel even though we're using Py3.11.How does
rules_python
figure out which Python wheel to install if there are multiple wheels for different python versions?We have an package on our internal private index. It has wheels for two python versions:
In
MODULE.bazel
, I set python_version=3.11:However, the Py3.12 wheel gets installed:
My requirements.txt has:
b7d2...e9e4
is for the 3.11 wheel, as verified bypython -m pip hash ./foobar-2.2.12-py311-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f8ea...ff55
is for the 3.12 wheel, as verified bypython -m pip hash ./foobar-2.2.12-py312-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
🔬 Minimal Reproduction
Working on this. Need to find a public pypi package that has separate 3.11 and 3.12 wheels. Know any?
🔥 Exception or Error
bazel build
doesn't complain at all. Duringbazel test
, Python throws this:🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
This appeared when we updated
foobar
from 2.2.10 to 2.2.12.For 2.2.10, the
requirements.txt
also had hashes for both Py3.11 and Py3.12.The text was updated successfully, but these errors were encountered: