1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

160 commits

Author SHA1 Message Date
Nguyễn Gia Phong f8b06a3906 Enable flake8-logging-format 2020-07-17 14:33:19 +07:00
Pradyun Gedam b419ca7317
Fix the link on new-resolver dependency conflicts 2020-07-17 06:03:01 +05:30
Tzu-ping Chung 01e0700e68 Skip installing if the version matches locally
This check only applies to explicit requirements since we avoid
downloading the dist from finder altogether when there is a matching
installation (although the check wouldn’t change the behaviour in that
case anyway).

We can do this when we build the `ExplicitRequirement` instead, like how
we did for `SpecifierRequirement`, but that would require us to resolve
the direct requirement’s version eagerly, which I don’t want to.

The implemented approach checks the version only after resolution, at
which point the distribution is already built anyway and the operation
is cheap.
2020-07-06 11:06:14 +08:00
Pradyun Gedam 20431888cb
Move check_invalid_constraint_type to req_install.py 2020-07-04 18:01:28 +05:30
Pradyun Gedam ace5485836
Change reject_invalid_constraint_types to be reusable 2020-07-04 17:50:42 +05:30
Pradyun Gedam 439e16f106
Merge pull request #8445 from uranusjr/hash-error-message
Set the requirement context on hash error
2020-06-24 18:41:03 +05:30
Pradyun Gedam fb68794188
Merge pull request #8026 from sbidoul/requested-sbi 2020-06-24 18:24:30 +05:30
Paul Moore 809eb3cad3 Fix a merge issue that didn't get caught by Brown Truck 2020-06-18 14:01:49 +01:00
Paul Moore d287033599
Merge pull request #8394 from pfmoore/nr_conflict_message
Improve the message for "Resolution Conflict" errors
2020-06-18 13:45:51 +01:00
Paul Moore 868ba81a74 Next iteration of message 2020-06-17 17:11:32 +01:00
Paul Moore a42ed23adc Fix format_for_error for remote URL candidates 2020-06-17 16:47:07 +01:00
Paul Moore 2795742b31 Add handling of inconsistent root requirements 2020-06-17 16:47:04 +01:00
Paul Moore 09d311594e Move error handling to factory.get_installation_error() 2020-06-17 16:44:53 +01:00
Paul Moore c827f2964c Revised ResolutionImpossible message 2020-06-17 16:44:53 +01:00
Paul Moore 27521ac1f2 Remove duplicates from the list of conflicts in ResolutionImpossible reporting 2020-06-17 16:44:53 +01:00
Tzu-ping Chung 78db0ba40b Set the requirement context on hash error
This improves the message shown by the hash error to include the
requirement that caused it.
2020-06-16 14:54:04 +08:00
Tzu-ping Chung 439da2f902 Implement yanked link warning in the new resolver 2020-06-15 16:38:10 +08:00
Tzu-ping Chung ebb90c6411 Reject incompatibile direct wheel link
This mirrors the behavior in the legacy resolver. In the future we may
want to backtrack in this situation instead, but I haven't found a clean
way to do this. We may need to introduce an "empty" requirement class.

The `PackageFinder.target_python` interface is also not the most clean.
Maybe we should expose the target Python object instead. Not sure yet.
2020-06-10 20:57:23 +08:00
Paul Moore 57b39a85bc
Merge pull request #8397 from uranusjr/new-resolver-fix-candidate-ordering
New resolver fix candidate ordering
2020-06-10 12:24:37 +01:00
Paul Moore 7bf78f05df
Merge pull request #8283 from uranusjr/pre-existing-build-directory-fix
Pre-existing build directory fix
2020-06-09 16:47:53 +01:00
Tzu-ping Chung e647b12540 Yield installed candidate at the correct position 2020-06-05 08:17:28 +08:00
Paul Moore d3ce025e8d
Merge pull request #8378 from uranusjr/direct-url-fix
Fix direct URL by always passing the template’s URL values into candidate
2020-06-04 17:31:45 +01:00
Tzu-ping Chung 09a7f271c7 Only attach UUID to build dir for spec candidates
These are the only cases where backtracking can happen. This approach
also accounts for VCS requirements relying on the same ensure function
to do cloning :/
2020-06-04 23:26:19 +08:00
Pradyun Gedam 85ce4dfd2c
Merge pull request #8374 from uranusjr/unsupported-link-with-marker
Correctly apply marker matching logic to all requirements
2020-06-04 11:34:31 +05:30
Tzu-ping Chung e4f870ba25 Raise proper exceptions on metadata mismatch 2020-06-03 03:52:07 +08:00
Tzu-ping Chung a0d12df489 Copy link values from template to candidate's ireq
We need to set the original link so the value is accessible in later
code, when we return the ireq backing the candidate. This is needed for
some parts of the post processing like PEP 610 support, which needs to
record the original, remote URL, not the potentially hit cache link.
2020-06-02 19:12:42 +08:00
Tzu-ping Chung a90fe9bd94 Remove outdated TODO comment 2020-06-02 19:07:12 +08:00
Tzu-ping Chung 1719fc3dcc Merge spec->req constructors
Since both functions now return Optional[Requirement], we can just use
the same implementation.
2020-06-02 12:02:52 +08:00
Tzu-ping Chung d5204dd0ba Move markers check into the ireq->req constructor
This makes the check apply to ALL requirement constructions, no
exceptions.
2020-06-02 12:02:52 +08:00
Tzu-ping Chung 258bd7945e Allow Candidate.iter_dependencies() to yield None 2020-06-02 11:53:08 +08:00
Stéphane Bidoul aa0c167498
Make sure user_supplied is propagated where needed 2020-05-31 18:33:51 +02:00
Stéphane Bidoul b9a19f6be0
Rename is_direct to user_supplied 2020-05-31 18:33:51 +02:00
Pradyun Gedam b5a5bcf13b
Rename parent to template 2020-05-28 18:50:09 +05:30
Tzu-ping Chung 9ee19a1190 Always use frozenset 2020-05-27 23:10:56 +08:00
Tzu-ping Chung b8404fde99 Always read extras from InstallRequirement.extras 2020-05-27 23:10:56 +08:00
Tzu-ping Chung 6c6b6a7765 Implement new Provider.find_matches() 2020-05-27 23:10:56 +08:00
Tzu-ping Chung 80f3b3e6e0 This is correct! 2020-05-27 20:19:38 +08:00
Tzu-ping Chung 48c3d0c8ec Typo in docstring
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2020-05-27 20:19:38 +08:00
Tzu-ping Chung bc9b288b1e Implement wheel cache lookup in the new resolver 2020-05-27 20:19:37 +08:00
Tzu-ping Chung dab7b94ade Derive Requirement name from ireq is possible
This is useful when resolving the wheel cache.
2020-05-27 20:19:37 +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
Paul Moore 48334aeb80 New resolver not raising DistributionNotFound 2020-05-22 15:36:10 +01:00
Pradyun Gedam 24e4cf7118
Update comments and documentation 2020-05-21 21:47:42 +05:30
Pradyun Gedam 901898c84f
Make mypy happy 2020-05-21 21:47:42 +05:30
Pradyun Gedam 9506a28114
ExtrasCandidate depends on exact base, before optional dependencies 2020-05-21 21:47:42 +05:30
Pradyun Gedam 95347df102
Directly require BaseCandidate in ExtrasCandidate 2020-05-21 21:47:42 +05:30
Pradyun Gedam 775f9ff6ca
Add a helper for making ExplicitRequirement objects 2020-05-21 21:47:38 +05:30
Paul Moore 278ac2d67f
Merge pull request #8286 from uranusjr/read-root-extras-correctly
Always read InstallRequirement.extras
2020-05-21 16:05:35 +01:00
Tzu-ping Chung d848ee934d Always read InstallRequirement.extras 2020-05-21 20:33:06 +08:00
Tzu-ping Chung de63eae0c3 Match logging 2020-05-21 18:09:35 +08:00