Skip to content

feat: Add setting generate_hashes for requirements - #1290

Merged
chrislovecnm merged 2 commits into
bazel-contrib:mainfrom
vonschultz:generate_hashes
Jul 10, 2023
Merged

feat: Add setting generate_hashes for requirements#1290
chrislovecnm merged 2 commits into
bazel-contrib:mainfrom
vonschultz:generate_hashes

Conversation

@vonschultz

Copy link
Copy Markdown
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

google-cla Bot commented Jul 2, 2023

Copy link
Copy Markdown

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

aignas commented Jul 3, 2023

Copy link
Copy Markdown
Collaborator

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

@chrislovecnm chrislovecnm left a comment

Copy link
Copy Markdown
Contributor

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