-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Avoid pip install --dry-run
downloading full wheels
#13482
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
base: main
Are you sure you want to change the base?
Changes from all commits
196f992
a844f3b
fc2eb8d
11d2a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
When PEP-658 metadata is available, full distribution download no longer occurs when using ``pip lock`` or ``pip install --dry-run``. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,15 +130,15 @@ def run(self, options: Values, args: list[str]) -> int: | |
|
||
requirement_set = resolver.resolve(reqs, check_supported_wheels=True) | ||
|
||
preparer.prepare_linked_requirements_more(requirement_set.requirements.values()) | ||
|
||
downloaded: list[str] = [] | ||
for req in requirement_set.requirements.values(): | ||
if req.satisfied_by is None: | ||
assert req.name is not None | ||
preparer.save_linked_requirement(req) | ||
downloaded.append(req.name) | ||
|
||
preparer.prepare_linked_requirements_more(requirement_set.requirements.values()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not very familiar with the preparer, could you explain why we need to prepare requirements earlier now? |
||
|
||
if downloaded: | ||
write_output("Successfully downloaded %s", " ".join(downloaded)) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,11 +180,6 @@ def resolve( | |
|
||
req_set.add_named_requirement(ireq) | ||
|
||
reqs = req_set.all_requirements | ||
self.factory.preparer.prepare_linked_requirements_more(reqs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the key change - the resolver no longer triggers additional preparation. Instead, we move this responsibility to consumers of the resolve result. Technically, I could have made the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any sort of documentation attached to the preparer where we could document this contract? While this change makes sense, it is also a bit arbitrary. |
||
for req in reqs: | ||
req.prepared = True | ||
req.needs_more_preparation = False | ||
return req_set | ||
|
||
def get_installation_order( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.