-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
Generating hashes from files for incompatible wheels isn't working #1532
Comments
4 tasks
This is still an issue on pip-tools 6.5.1 with pip 22.0.4 |
RazerM
pushed a commit
to RazerM/pip-tools
that referenced
this issue
Apr 4, 2022
Fixes jazzband#1532 This issue only shows up for PyPI servers where we can't get hashes from a JSON API. When pip-compile runs, `find_all_candidates` first gets called outside of an `allow_all_wheels()` context, and pip caches the list of candidates. Later, while pip-compile computes hashes from the files, the effects of `allow_all_wheels()` are not seen because the cached candidates are returned. In order for the test to pass I've added a blank sdist for small-fake-multi-arch so that there's always at least one candidate when pypi_repository.get_hashes is called outside of allow_all_wheels
RazerM
added a commit
that referenced
this issue
Apr 4, 2022
Fixes #1532 This issue only shows up for PyPI servers where we can't get hashes from a JSON API. When pip-compile runs, `find_all_candidates` first gets called outside of an `allow_all_wheels()` context, and pip caches the list of candidates. Later, while pip-compile computes hashes from the files, the effects of `allow_all_wheels()` are not seen because the cached candidates are returned. In order for the test to pass I've added a blank sdist for small-fake-multi-arch so that there's always at least one candidate when pypi_repository.get_hashes is called outside of allow_all_wheels Co-authored-by: Frazer McLean <[email protected]> Co-authored-by: Albert Tugushev <[email protected]>
atugushev
added
bug
Something is not working
hashes
Related to hashes generated via --generate-hashes
labels
Apr 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment Versions
Steps to replicate
(These replication steps require that you run this on a machine not compatible with the manylinux wheels provided in the demo repository used in the following commands)
Create a requirements file using the project I prepared
Patch the installed pip to remove this line.
Generate a new requirements file:
Compare the files
Expected result
Both files should include all hashes
Actual result
Only hashes compatible with my system are generated.
The easy solution I see would be to call
self.finder.find_all_candidates.cache_clear()
inPyPIRepository.allow_all_wheels
, but as maintainers of the library you'll probably have more insight. Maybe even creating a new finder instance rather than rely on this implementation detail?The text was updated successfully, but these errors were encountered: