-
-
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
Provide a way to limit to a single hash per requirement when generating hashes #1330
Comments
Maybe this could be implemented with an option that accepts a value, e.g. |
I was looking into this a bit. It looks like packaging.utils.parse_wheel_filename() would allow for getting the tags for each file that is available on PyPI. That can be compared with the executing python version. However, some packages upload multiple In the case of needing to actually download the files to get the hash, removing the call to |
Hello @cjerdonek, Could you try out the #1406? Does it resolve the issue? |
Seems #1406 was closed since it was outdated, but seems a solution was already implemented there, would need somebody to take it up again it seems. |
This is quite a problem for my environment; some packages produce around 30-40 hashes and it takes over half an hour for my requirements to generate. Is anyone still working on a fix? |
bump on this, would be awesome if you could take another stab at it @plannigan ? |
I don't think this is something I'm likely to return to. If anyone want to work on this issue, feel free to use my previous work as a jumping off point. |
What's the problem this feature will solve?
Currently, when the
--generate-hashes
option is passed topip-compile
,pip-compile
will include potentially many hashes per requirement, even if only one is needed / desired.Describe the solution you'd like
This feature request is for
pip-compile
to expose a command-line option that would limit the output to including only a single hash, namely the hash of what would be installed in the environment in whichpip-compile
is being run.This option would be useful in situations where the exact deployment target is known (e.g. when using containers). For one, the requirements files generated by
pip-compile
would be shorter and easier to review since they wouldn't include extraneous info. Secondly, I believe this would provide greater determinism / reproducibility. For example, currently, if a release that was previously being installed from a requirements file generated bypip-compile
was yanked from PyPI, then the result of what would be installed from that requirements file could change, even though the requirements file didn't change (because the requirements file currently includes more hashes than what was originally installed).The text was updated successfully, but these errors were encountered: