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

Include hashes in exported requirements.txt file for zip files #1103

Closed
blueyed opened this issue May 31, 2022 · 0 comments · Fixed by #1108
Closed

Include hashes in exported requirements.txt file for zip files #1103

blueyed opened this issue May 31, 2022 · 0 comments · Fixed by #1108
Labels
⭐ enhancement Improvements for existing features

Comments

@blueyed
Copy link
Contributor

blueyed commented May 31, 2022

When using a zip file (e.g. "django-fsm-admin @ https://github.com/infarm/django-fsm-admin/archive/38f2719935be16a7c01d110651ad8ea8383bbe1d.zip") as a dependency, pdm export -f requirements does not include hashes for it, and pip then fails:

ERROR: Hashes are required in --require-hashes mode, but they are missing from some requirements. Here is a list of those requirements along with the hashes their downloaded archives actually had. Add lines like these to your requirements files to prevent tampering. (If you did not enable --require-hashes manually, note that it turns on automatically when any package has a hash.)
https://github.com/infarm/django-fsm-admin/archive/38f2719935be16a7c01d110651ad8ea8383bbe1d.zip --hash=sha256:32bc3205cec3ec83a78dd0fd0b5f02f25d81a9689493c2580c8fdb4e02c6f4ec

It would be good, if those where added automatically already.

Note that I am using a zip file here, since pip does not support it with Git urls:

ERROR: Can't verify hashes for these requirements because we don't have a way to hash version control repositories: …

Using PDM version 1.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants