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

Use Hashes with pip[-compile] #497

Merged
merged 2 commits into from
May 5, 2021
Merged

Use Hashes with pip[-compile] #497

merged 2 commits into from
May 5, 2021

Conversation

ghickman
Copy link
Contributor

@ghickman ghickman commented May 4, 2021

This switches to generating and using hashes for the Python dependencies.

I've not scripted the generation of dependencies because I expect the split-dependencies branch to bring that in.

Copy link
Member

@bloodearnest bloodearnest left a comment

Choose a reason for hiding this comment

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

+1

I think this is slightly better than currently, in that it will start failing to build if a PyPI user deletes and uploads a new wheel.

But it's only as secure as our updating process. How is a hash change failure surfaced? Are we going to fix it by just updating the requirements.txt, and thus trust the new hash?

Food for thought.

@bloodearnest
Copy link
Member

+1

I think this is slightly better than currently, in that it will start failing to build if a PyPI user deletes and uploads a new wheel.

But it's only as secure as our updating process. How is a hash change failure surfaced? Are we going to fix it by just updating the requirements.txt, and thus trust the new hash?

Food for thought.

Also, I realised that I think this is of little benefit if we are not also pinning in requirements..n

@bloodearnest bloodearnest reopened this May 5, 2021
@bloodearnest
Copy link
Member

do, sorry, meant to cancel out of a comment, but closed it instead 🤦

@ghickman
Copy link
Contributor Author

ghickman commented May 5, 2021

deletes and uploads a new wheel

You haven't been able to replace an existing file on PyPI for many years now! You can delete a file from a version, but you can't replace that file in the given version.

Some more info here: pypa/packaging-problems#74 (comment) (linked to a GitHub issue because the mailing list link is broken for me but it might just be a transient thing)

@ghickman ghickman merged commit 5885ba5 into main May 5, 2021
@ghickman ghickman deleted the require-hashes branch May 5, 2021 09:52
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.

None yet

2 participants