pip-tools icon indicating copy to clipboard operation
pip-tools copied to clipboard

Compute hashes from all index servers

Open stefansjs opened this issue 2 years ago • 7 comments

Fixes #1536.

When pip-compile encounters one index server which supports the json API it does not go on to compute hashes on files from "simple" index servers. This change fetches hashes from all index servers, and computes hashes on all files that don't have one provided by a json API

Contributor checklist
  • [x] Provided the tests for the changes.
  • [x] Assure PR title is short, clear, and good to be included in the user-oriented changelog
Maintainer checklist
  • [ ] Assure one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
  • [ ] Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

stefansjs avatar Jan 25 '22 22:01 stefansjs

This is a review for #1536

stefansjs avatar Jan 25 '22 22:01 stefansjs

This would also fix #1135. But the current implementation won't work with index URLs ending in a slash, see #1669. aws codeartifact login generates such index URLs.

@stefansjs do you plan to continue with the PR? I'm happy to help getting it ready. :)

michael-k avatar Aug 18 '22 18:08 michael-k

Yes I would love to. I noticed that the latest master is a non trivial merge. I haven't looked deeply into what needs to change. I would really appreciate and help/guidance. It would be great to get this into master.

stefansjs avatar Aug 18 '22 18:08 stefansjs

This would also fix https://github.com/jazzband/pip-tools/issues/1135.

This was a false assumption after skimming over the code and noticing the package_index.simple_url. After a closer look I realize that it's only used to indicate where a link was coming from.

michael-k avatar Aug 19 '22 09:08 michael-k

This PR might be superseded by #1723. I'm I right @neykov?

atugushev avatar Nov 19 '22 14:11 atugushev

This PR might be superseded by #1723. I'm I right @neykov?

Looks like this PR goes one step further, fetching hashes from all available indexes, not just the primary one. It would still be useful to clean up and merge after #1723.

neykov avatar Nov 19 '22 16:11 neykov

#1723 has been merged, @stefansjs do you want to rebase this per https://github.com/jazzband/pip-tools/pull/1556#issuecomment-1320915812?

jeffwidman avatar Aug 09 '23 23:08 jeffwidman