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

Fix certain hash miss matches in case of non weel installations #7594

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the test by also providing the non_wheel archive hash
  • Loading branch information
quantum-byte committed Mar 5, 2023
commit 65c36b20c8cb56176da541bcfb0da1cd744686f0
7 changes: 1 addition & 6 deletions src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def _download_link(self, operation: Install | Update, link: Link) -> Path:
# validate the original (downloaded or cached) archive only if we can. e.g. if
# we use the cached wheel or the actual downloaded archive
if package.files and link.filename == archive.name:
self._validate_archive_hash(archive, package)
self._populate_hashes_dict(archive, package)

if archive.suffix != ".whl":
message = (
Expand All @@ -727,11 +727,6 @@ def _download_link(self, operation: Install | Update, link: Link) -> Path:

archive = self._chef.prepare(archive, output_dir=output_dir)

elif link.is_wheel:
self._populate_hashes_dict(
archive, package, validate=False
) # already validated

return archive

def _populate_hashes_dict(
Expand Down