Skip to content
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

Work with provided hashes #1684

Open
ghost opened this issue Sep 29, 2022 · 1 comment
Open

Work with provided hashes #1684

ghost opened this issue Sep 29, 2022 · 1 comment
Labels
feature Request for a new feature hashes Related to hashes generated via --generate-hashes

Comments

@ghost
Copy link

ghost commented Sep 29, 2022

What's the problem this feature will solve?

Let's say I want to ensure the hashes for a package I've found are the ones I've decided on.

I could have a req.in file like this:

flymetothemoon==1.4.1 --hash=sha256:e9c771b6136f2392f5c1ca2c8045d0e503981f8c90a111213473e4644765df4f

pip-compile will ignore the provided hash(es), and fetch/generate new ones with the --generate-hashes option.

Describe the solution you'd like

  • Analogous to how pip does/wants it, --generate-hashes is implied if --hash appears for any package.
  • Hashes provided in input files aren't clobbered. If there's something wrong with them, or I have not provided enough, then that's my problem.

Being able to provide hashes explicitly is useful if I'm computing them myself.

@atugushev
Copy link
Member

Just out of the curiosity, what's the use case for this feature in the wild?

@atugushev atugushev added feature Request for a new feature hashes Related to hashes generated via --generate-hashes labels Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for a new feature hashes Related to hashes generated via --generate-hashes
Projects
None yet
Development

No branches or pull requests

1 participant