Commit Graph

24 Commits

Author SHA1 Message Date
Pradyun Gedam 58c594c06b
Prepare isort for black 2020-09-23 21:47:47 +05:30
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Tzu-ping Chung dfaa111004 Pull in hashes from constraint files 2020-09-03 17:26:52 +08:00
Tzu-ping Chung 32b5e43c79 Flip the flag with another name 2020-08-03 05:28:10 +08:00
Tzu-ping Chung 3ce63a62d7 Ask candidates for dependencies even on --no-deps
ExtrasCandidate need to provide one dependency on the non-extra-ed self.
2020-08-02 16:12:46 +08:00
Tzu-ping Chung 258bd7945e Allow Candidate.iter_dependencies() to yield None 2020-06-02 11:53:08 +08:00
Tzu-ping Chung 6c6b6a7765 Implement new Provider.find_matches() 2020-05-27 23:10:56 +08:00
Tzu-ping Chung 5f2bc2b47c DO NOT sort the returned matches by version
A higher version is not always preferred over the lower; the user may
be explicitly preferring lower versions by specifying --prefer-binary
or similar flags.

PackageFinder already takes these into account for these and orders
the matches. Don't break it.
2020-05-25 14:12:36 +08:00
Tzu-ping Chung c3ac76f66c Turn Candidate.get_dependencies() into iterable
This makes it easier to exclude dependencies when markers don't match.
2020-05-21 15:39:16 +08:00
Nguyễn Gia Phong 29940371cc Fix typo and simplify ireq call 2020-05-16 12:04:17 +07:00
Paul Moore 9cf1bed78d Address review comments 2020-05-14 11:33:30 +01:00
Paul Moore 0db022fc42 Remove left-over print from debugging 2020-05-13 18:04:20 +01:00
Paul Moore ddbc8fd7c1 Split find_matches into generation and sorting 2020-05-13 17:52:09 +01:00
Paul Moore 64b3d1b278 Merge constraints into a single SpecifierSet 2020-05-06 11:30:25 +01:00
Paul Moore ee4830b5ec Move constraints from factory to provider 2020-05-06 10:56:50 +01:00
Tzu-ping Chung 4491f38047 Return Requirement directly from get_dependencies
This is possible now we have the factory construct.
2020-04-01 15:31:52 +08:00
Tzu-ping Chung 07563847b0 Decouple candidate and requirement modules
This introduces a new module "factory" that contains all methods dealing
with producing candidates/requirements from an input
requirement/candidate. This allows both models to know nothing about
each other, and simply rely on the intermediate to produce the other.

I *believe* this also helps us reduce merge conflicts due to adding
arguments to those producer functions, since now we only need to modify
the factory, and exactly one of candidate/requirement.

This is only part of a big scheme--the plan is to also move
Candidate.get_dependencies() and Requirement.find_matches() into the
factory class, so they can avoid holding and passing around finder,
preparer, and make_install_req. This is also necessary to change the
return type of Candidate.get_dependencies() to Requirement without
hard-coupling.
2020-03-27 03:14:51 +08:00
Paul Moore fea9766fa2 Merge branch 'master' into new_resolver_extras 2020-03-26 15:49:43 +00:00
Paul Moore ffb56db5dd Allow candidates to not have an associated install requirement 2020-03-26 11:19:10 +00:00
Paul Moore 76de49bc24 Make a proper get_install_requirement method for candidates 2020-03-25 12:27:24 +00:00
Tzu-ping Chung 3cb7a08f0d Implement ignore_dependencies in new resolver
If this flag is set, simply report every candidate has no dependencies.
2020-03-24 02:02:36 +08:00
Paul Moore ffe553638c Address review requirements 2020-03-19 10:55:33 +00:00
Paul Moore 1ebe1e0935 Integrate the new provider with --unstable-feature=resolver 2020-03-18 14:49:49 +00:00
Paul Moore 7d2eb544b5 Implement PipProvider 2020-03-18 14:42:16 +00:00