Pradyun Gedam
7165ab8cb9
Revert "Skip candidate not providing valid metadata"
2020-12-15 10:17:20 +00:00
Tzu-ping Chung
d45541c8f3
Skip candidate not providing valid metadata
...
This is done by catching InstallationError from the underlying
distribution preparation logic. There are three cases to catch:
1. Candidates from indexes. These are simply ignored since we can
potentially satisfy the requirement with other candidates.
2. Candidates from URLs with a dist name (PEP 508 or #egg=). A new
UnsatisfiableRequirement class is introduced to represent this; it is
like an ExplicitRequirement without an underlying candidate. As the
name suggests, an instance of this can never be satisfied, and will
cause eventual backtracking.
3. Candidates from URLs without a dist name. This is only possible for
top-level user requirements, and no recourse is possible for them. So
we error out eagerly.
The InstallationError raised during distribution preparation is cached
in the factory, like successfully prepared candidates, since we don't
want to repeatedly try to build a candidate if we already know it'd
fail. Plus pip's preparation logic also does not allow packages to be
built multiple times anyway.
2020-12-12 02:23:32 +08:00
Pradyun Gedam
258242f177
Remove test for not reinstalling wheels, as requested
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam
9add1c1f61
Add deprecation warning when reinstalling sdists
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:08 +00:00
Pradyun Gedam
d6e3643fd9
Print a message and don't reinstall wheels
...
Also, adds a test for source distributions being reinstalled.
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:13:04 +00:00
Pradyun Gedam
bb7fce7209
Ensure we're not mishandling local indexes
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:12:37 +00:00
Pradyun Gedam
ce46a5e36d
Re-install local candidates unconditionally
...
Signed-off-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2020-11-25 14:12:08 +00:00
Tzu-ping Chung
c3670b36cb
2020 resolver can constrain path/URL to versions
2020-11-23 11:51:14 +08:00
Tzu-ping Chung
9b3cd280fd
Add failing test
2020-11-21 22:14:24 +08:00
Tzu-ping Chung
d08b4d99e2
Use packaging.version to check version equality
2020-11-03 16:04:35 +08:00
Pradyun Gedam
6f26fb9fee
Update tests for resolver changes
2020-10-30 23:08:31 +05:30
Pradyun Gedam
f3307a5103
Present a message upon first backtrack
2020-10-27 19:32:36 +05:30
Pradyun Gedam
95171c881f
Display messages when backtracking on a package
2020-10-27 19:32:35 +05:30
Tzu-ping Chung
d22775819b
Test for candidate ordering
2020-10-13 16:12:11 +08:00
Tzu-ping Chung
8b2b92485c
Include Requires-Python dep even with --no-deps
2020-08-26 09:49:25 +08:00
Tzu-ping Chung
312d1d0473
Add failing test for constraints with markers
2020-08-07 13:43:49 +08:00
Jussi Kukkonen
76b20d738e
Deprecate requirements format "base>=1.0[extra]"
...
This requirements format does not conform to PEP-508. Currently the
extras specified like this work by accident (because _strip_extras()
also parses them). The version checks end up being done with a
misparsed version '1.0[extra]' -- this is not changed in this commit.
Add deprecation warning and fix the corresponding resolver test. Add a
command line test.
Note that we really only check that the Requirement has SpecifierSet
with a specifier that ends in a ']'. A valid version number cannot
contain ']' and no wheels currently on pypi have versions ending in ']'.
2020-07-13 12:33:50 +03:00
Pradyun Gedam
79de2c8911
Switch to --use-feature for determining which resolver to use
...
Also changes all invocations in the tests, to the new flag.
2020-07-03 18:49:56 +05:30
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
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
Stéphane Bidoul
ca439016e5
Merge pull request #8370 from ssurbhi560/add_method_to_new_resolver_and_download
...
Add methods for path lookups in test_download.py and test_new_resolver.py
2020-06-09 22:23:02 +02:00
Tzu-ping Chung
53ce9b66ac
Add failing test for bug found
2020-06-05 08:14:46 +08:00
Tzu-ping Chung
4ca684f3b8
Fix for source directory reuse
2020-06-04 00:32:57 +08:00
Surbhi Sharma
fe761c5f4f
Use helper methods in test_download and test_new_resolver
2020-05-31 18:55:43 +05:30
Paul Moore
d7fbc9fb16
Merge pull request #8282 from uranusjr/pre-existing-build-directory-reprod
...
Add reprod for pre-existing build dir failure
2020-05-27 14:01:57 +01:00
Pradyun Gedam
50c9ea2fe0
This works now!
2020-05-21 21:47:42 +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
19db59747a
Use a temp requirements file to avoid shell syntax
2020-05-21 21:37:19 +08:00
Tzu-ping Chung
4d17d932c5
Add test for picking up non-PEP-508 extrax
2020-05-21 21:01:08 +08:00
Tzu-ping Chung
a7b643004c
Add reprod for pre-existing build dir failure
2020-05-21 17:22:54 +08:00
Tzu-ping Chung
0a4629febb
Add test for marker that should fail for now
2020-05-21 15:42:58 +08:00
Paul Moore
c74577e18e
Merge pull request #8186 from uranusjr/install-req-from-dist-line-rewrite
...
Build ireq line from parent for installed dist
2020-05-15 22:33:03 +01:00
Paul Moore
d53e880cfe
Merge pull request #8229 from uranusjr/one-constraint-test
...
Add one more constraint test
2020-05-15 16:37:00 +01:00
Paul Moore
4c599edc5b
Merge pull request #8243 from pfmoore/message_fixes
...
Fix some test failures related to message differences
2020-05-15 15:25:31 +01:00
Paul Moore
041f83f76a
Doh, I forgot to update our own tests...
2020-05-15 14:45:44 +01:00
Paul Moore
6fcaf49cb0
Tidy up handling of unexpected forms of constraint
2020-05-14 17:04:18 +01:00
Tzu-ping Chung
713645a554
Add one more constraint test
2020-05-13 07:13:19 +08:00
Tzu-ping Chung
9eb47650b0
Please don't use shell=True :(
2020-05-05 20:29:21 +08:00
Tzu-ping Chung
1f32d8dfc6
Refine output check to accomodate specifier change
2020-05-05 18:42:53 +08:00
Paul Moore
8664218164
Merge branch 'master' into nr_constraints2
2020-05-05 11:41:09 +01:00
Paul Moore
1599cc2a36
Merge branch 'master' into nr_upgrade_strategy
2020-05-03 11:01:27 +01:00
Paul Moore
0058bb5212
Improve test
2020-04-29 14:55:15 +01:00
Paul Moore
5186f05bd7
Add tests for constraints
2020-04-29 12:16:09 +01:00
Tzu-ping Chung
06d9ea0952
Mark local install as xfail
2020-04-27 14:36:59 +08:00
Tzu-ping Chung
0104adb037
Add failing test for explicit requirement extras
2020-04-26 16:39:31 +08:00
Paul Moore
04bf571521
Ensure root requirement name is canonicalised
2020-04-24 14:30:34 +01:00
Paul Moore
d605530b44
Implement upgrade strategies for the new resolver
2020-04-24 11:08:06 +01:00
Tzu-ping Chung
4fb7687fa7
Add failing tests
2020-04-18 22:47:44 +08:00
Pradyun Gedam
97f639057e
Merge pull request #8014 from uranusjr/always-return-installed-candidate
2020-04-18 16:15:14 +05:30