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

Accelerate locking by fetching hash from url fragment #4500

Merged
merged 12 commits into from
Oct 28, 2020
Next Next commit
Reduce the number of internet requests to get hash
  • Loading branch information
frostming committed Oct 27, 2020
commit 4236a7130350906df6185190fea489fd736a6624
2 changes: 1 addition & 1 deletion pipenv/patched/piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_hash(self, location):
can_hash = new_location.hash
if can_hash:
# hash url WITH fragment
hash_value = self.get(new_location.url)
hash_value = self.get(new_location.url) or new_location.hash
if not hash_value:
hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
hash_value = hash_value.encode('utf8') if hash_value else None
Expand Down
Loading