-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Move fast-dep handling to RequirementPreparer #8685
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d957cc9
Don't set _dist until it has been validated
chrahunt 7289625
Remove redundant guard variable
chrahunt 7a5e043
Remove unnecessary check for _dist
chrahunt 4d94ae4
Move non-lazy req fallback outside of `_fetch_metadata`
chrahunt 8c3c0ad
Move _fetch_metadata into _prepare
chrahunt a72d04f
Move common processing out of _fetch_metadata
chrahunt ec5b6d7
Remove extra metadata consistency check
chrahunt 45ab317
Move call to _fetch_metadata next to call to RequirementPreparer
chrahunt e49dcfd
Move lazy_wheel warning out of Resolver
chrahunt f0d4df1
Propagate lazy_wheel option through RequirementPreparer
chrahunt f460307
Pass InstallRequirement to _fetch_metadata
chrahunt defbf82
Use link from InstallRequirement
chrahunt 9e46391
Extract name and version from Wheel link
chrahunt 4e1bff7
Promote Wheel-related assertions to LinkCandidate constructor
chrahunt 6c4d4f3
Move _fetch_metadata to RequirementPreparer
chrahunt 21db4f3
Log in one common location
chrahunt c7ade15
Pass link to _fetch_metadata instead of req
chrahunt 8b838eb
Prepare lazy wheels more so they are downloaded
chrahunt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,17 +49,8 @@ def __init__( | |
force_reinstall, # type: bool | ||
upgrade_strategy, # type: str | ||
py_version_info=None, # type: Optional[Tuple[int, ...]] | ||
lazy_wheel=False, # type: bool | ||
): | ||
super(Resolver, self).__init__() | ||
if lazy_wheel: | ||
logger.warning( | ||
'pip is using lazily downloaded wheels using HTTP ' | ||
'range requests to obtain dependency information. ' | ||
'This experimental feature is enabled through ' | ||
'--use-feature=fast-deps and it is not ready for production.' | ||
) | ||
|
||
assert upgrade_strategy in self._allowed_strategies | ||
|
||
self.factory = Factory( | ||
|
@@ -72,7 +63,6 @@ def __init__( | |
ignore_installed=ignore_installed, | ||
ignore_requires_python=ignore_requires_python, | ||
py_version_info=py_version_info, | ||
lazy_wheel=lazy_wheel, | ||
) | ||
self.ignore_dependencies = ignore_dependencies | ||
self.upgrade_strategy = upgrade_strategy | ||
|
@@ -169,6 +159,9 @@ def resolve(self, root_reqs, check_supported_wheels): | |
|
||
req_set.add_named_requirement(ireq) | ||
|
||
for actual_req in req_set.all_requirements: | ||
self.factory.preparer.prepare_linked_requirement_more(actual_req) | ||
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. Thanks, this is fantastic! |
||
|
||
return req_set | ||
|
||
def get_installation_order(self, req_set): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is probably something we can do in a follow-up, but we should add logging here, to denote which branch we're going through, and introduce early returns to make the flow cleaner.
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.
Let's do this in a follow up. @McSinyx wanna pick this up? :)
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.
Yes I'm glad to.