Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Added package hashing logic #244

Merged
merged 8 commits into from
May 27, 2020
Merged

Added package hashing logic #244

merged 8 commits into from
May 27, 2020

Conversation

terricain
Copy link
Contributor

@terricain terricain commented May 19, 2020

Adds logic to calculate package hashes on upload, adds it to file metadata as well so if the database is rebuilt, re-hashing is not needed.

New option pypi.calculate_package_hashes added to control whether to calculate package hashes. Enabled by default as that means the JSON and simple API will act more like the real PyPI.

Depends on #243
Fixes #222

TODO:

  • add hashing logic
  • test for sha256 url fragment in simple endpoint
  • test for hashes in json output
  • test for hash calculation on upload
  • test for hash retrieval on list
  • update docs about pypi.calculate_package_hashes option
  • Create Azure and S3 migration script (havent used GCE so someone else can create that when needed)

@coveralls
Copy link

coveralls commented May 19, 2020

Coverage Status

Coverage increased (+0.08%) to 82.856% when pulling c2bac33 on terrycain:feature/hashes into 703190d on stevearc:1.1.

@terricain terricain changed the base branch from 1.0 to 1.1 May 23, 2020 13:43
@terricain
Copy link
Contributor Author

@stevearc Ready for a review when you get a chance.

@terricain terricain changed the title WIP: Added package hashing logic Added package hashing logic May 26, 2020
@stevearc stevearc merged commit 41f0985 into stevearc:1.1 May 27, 2020
@stevearc
Copy link
Owner

Looks good! Will cut a 1.1 release by EOW

@terricain
Copy link
Contributor Author

Awesome thanks

@terricain terricain deleted the feature/hashes branch May 27, 2020 17:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants