Skip to content

Conversation

vonschultz
Copy link
Contributor

Add the new parameter generate_hashes (default True) to compile_pip_requirements(), letting the user control whether to put --hash entries in the requirements lock file generated. In particular if the generated file is supposed to be used as a constraints file the hashes don't make much sense.

Fixes #894.

Add the new parameter `generate_hashes` (default True) to
`compile_pip_requirements()`, letting the user control whether to put
`--hash` entries in the requirements lock file generated. In
particular if the generated file is supposed to be used as a
constraints file the hashes don't make much sense.

Fixes #894.
@google-cla
Copy link

google-cla bot commented Jul 2, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Buildifier thinks there's an empty line too much. Fix the complaint.
@aignas
Copy link
Collaborator

aignas commented Jul 3, 2023

+1 to this change as right now I have a genrule that is stripping the hashes away in one of our projects.

Copy link
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chrislovecnm chrislovecnm added this pull request to the merge queue Jul 10, 2023
Merged via the queue into bazel-contrib:main with commit 3ffdf01 Jul 10, 2023
@vonschultz vonschultz deleted the generate_hashes branch July 10, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compile_pip_requirements: a way to disable hashes (for e.g. constraints files)

3 participants