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

140 commits

Author SHA1 Message Date
Pradyun Gedam
0db5d95da0
Merge branch 'main' into extra-normalization 2023-09-10 10:19:13 +01:00
ddelange
510c6acf69
Filter out yanked links from available versions error message 2023-08-26 12:17:40 +02:00
Shantanu
901db9cf8d
Use a set for TargetPython.get_tags for performance (#12204) 2023-08-06 11:08:16 -05:00
Tzu-ping Chung
d64190c5fb Try to find dependencies from unnormalized extras
When an unnormalized extra is requested, try to look up dependencies
with both its raw and normalized forms, to maintain compatibility when
an extra is both specified and requested in a non-standard form.
2023-05-11 15:10:14 +08:00
Tzu-ping Chung
21857784d6 Implement PEP 685 extra normalization in resolver
All extras from user input or dependant package metadata are properly
normalized for comparison and resolution. This ensures requests for
extras from a dependant can always correctly find the normalized extra
in the dependency, even if the requested extra name is not normalized.

Note that this still relies on the declaration of extra names in the
dependency's package metadata to be properly normalized when the package
is built, since correct comparison between an extra name's normalized
and non-normalized forms requires change to the metadata parsing logic,
which is only available in packaging 22.0 and up, which pip does not use
at the moment.
2023-04-26 12:53:24 -06:00
Stéphane Bidoul
40cd79d6e5 Check hashes of cached built wheels agains origin source archive 2023-04-14 08:03:48 +02:00
Pradyun Gedam
78ab4cf071
Bump all linters other than mypy (#11901) 2023-03-27 20:03:11 +01:00
Pradyun Gedam
8bebea801d
Remove --use-deprecated=backtrack-on-build-failures
This flag is due for removal, in pip 22.2.
2022-07-15 08:27:23 +01:00
Pradyun Gedam
2d028e140e Revert "Filter available distributions using hash declarations from constraints files (#10962)"
This reverts commit 0c284520c6.
2022-05-03 17:50:21 +01:00
q0w
0c284520c6
Filter available distributions using hash declarations from constraints files (#10962) 2022-03-16 07:43:06 +00:00
Tzu-ping Chung
d61b539353 More structured link evaluation result
A new enum class is implemented for the link evaluator to use instead
of a simple boolean to better distinguish between various evaluation
errors. This allows the caller to better distinguish error sources with
a structured check instead of fragile error string comparison.
2022-03-10 20:41:26 +08:00
Tzu-ping Chung
2e5e9e54bc
Merge branch 'main' into requires-python 2022-03-10 15:41:05 +08:00
Pradyun Gedam
8b36ba5d94
Fix typo
explicit{ely -> ly}
2022-01-29 09:11:51 +00:00
Pradyun Gedam
9d0db8839f
Add --use-deprecated=backtrack-on-build-failures
This serves as an opt-out from build failures causing the entire
installation to abort.
2022-01-27 18:11:05 +00:00
Pradyun Gedam
8eeee22304
Abort immediately on metadata generation failure instead of backtracking
This behaviour is more forgiving when a source distribution cannot be
installed (eg: due to missing build dependencies or platform
incompatibility) and favours early eager failures instead of trying to
ensure that a package is installed regardless of the amount of effort it
takes.
2022-01-27 18:11:02 +00:00
Pradyun Gedam
a835e0a277
Prettify messages for discarding candidates due to issues
These are more pleasing colours and, more importantly, a clearer
presentation style of the package vs the error.
2022-01-25 01:38:23 +00:00
Pradyun Gedam
997c5a742b
Merge pull request #10625 from albertosottile/ignore_yanked 2022-01-24 23:47:54 +00:00
Alberto Sottile
705742337d Implement suggested changes 2021-11-07 21:26:12 +01:00
Alberto Sottile
d1ba9d519e Fix permissions 2021-11-07 11:36:52 +01:00
Alberto Sottile
8293826bf0 Change specifier detection logic to exclude compatible release clauses 2021-11-06 16:24:00 +01:00
Ed Morley
cfbdc48635
Update the docs URL shown for ResolutionImpossible errors
Previously the `ResolutionImpossible` error message referenced:
https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

However that section was moved in #10279, to:
https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Updating the URL not only saves a click, but also saves having to find the related
content halfway-down the dependency resolution page, since the forwarding link 
was to the top of the page rather than the specific section.
2021-11-03 09:38:27 +00:00
Alberto Sottile
6b62c28060 Skip yanked releases unless specified 2021-10-30 11:40:40 +02:00
Alex Hedges
e1f81bfa4d Fix many typos 2021-10-11 15:48:17 -04:00
Joseph Bylund
dee6690f06 Renames, moves, docstrings, comments 2021-10-07 07:11:33 -04:00
Joseph Bylund
bd87828eae (joe) black + imports 2021-10-06 12:48:48 -04:00
Joseph Bylund
bb8824439e (joe) requirement creation is very expensive, and at least in my test case there were only ~200 unique requirement objects created in ~5-10 minutes of resolution time 2021-10-06 12:42:44 -04:00
Jon Dufresne
60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
ronaudinho
22ea509025
update log message 2021-09-21 00:33:02 +07:00
ronaudinho
f2727bcf11 include skips due to requires-python in logged links 2021-09-19 12:55:29 +07:00
ronaudinho
42613daf36 explain requires-python ignored links 2021-09-19 12:54:12 +07:00
Tzu-ping Chung
135faabfd6
Remove direct pkg_resource usages from resolver and preparer 2021-08-23 02:07:33 +08:00
Tzu-ping Chung
d4d2445350 Remove get_installed_distributions usages
The function itself is kept for now because it's currently used to test
the pip.metadata subpackage...
2021-07-22 23:22:12 +08:00
Tzu-ping Chung
73edd74c56 Detect user-requested package names by preparing
This always prepares each explicit requirements when the resolver is
run, instead of when they are being resolved. But we always want to
prepare them anyway (an explicit requirement has only one candidate, so
it's either do or die), so this is not really a problem.
2021-07-12 12:40:34 +08:00
Tzu-ping Chung
5d81040ee8 Refactor root requirement collection into factory 2021-07-12 12:40:32 +08:00
Harutaka Kawamura
72e1ff35c7
Complete type annotations in pip/_internal/resolution (#10125) 2021-07-12 11:41:48 +08:00
briantracy
37a2b12a21
Special case warning for requirements.txt install (#9915)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-07-12 11:40:43 +08:00
Tzu-ping Chung
d18ac6250e Exclude a known incompatible installed candidate
The resolver collects previously known incompatibilites and sends them
to the provider. But previously the provider does not correctly exclude
the currently-installed candidate if it is present in that
incompatibility list, causing the resolver to enter a loop trying that
same candidate. This patch correctly applies incompat_ids when producing
an AlreadyInstalledCandidate and exclude it if its id() is in the set.
2021-05-18 23:00:25 +08:00
Tzu-ping Chung
cf4e3aa055 Remove stray id(candidate) call
Also moves the incompatibility candidate calculation to closer to their
usages.
2021-04-24 02:09:24 +08:00
Tzu-ping Chung
9cab9834fa Refactor Factory.find_candidates() for readability 2021-04-19 12:21:35 +08:00
Tzu-ping Chung
0305e0d596 Implement extra-ed requirement merging
When a requirement is requested multiple times, some via a direct URL
("req @ URL") and some not but with extras ("req[extra] VERSION"), the
resolver previous could not correctly find "req[extra]" if "req" is
available in an index.

This additional logic makes the resolver, when encountering a
requirement with identifier "req[extra]", to also look for explicit
candidates listed under "req", and add them as found matches for
"req[extra]".
2021-04-19 08:37:35 +08:00
Stéphane Bidoul
8fc65ea53f
Merge pull request #9673 from mwchase/url-constraints-final-2
Support URL constraints in the new resolver
2021-04-18 12:31:45 +02:00
Max W Chase
4c69ab2a2c Support URL constraints in the new resolver
Fixes #8253
2021-04-17 07:59:57 -04:00
Tzu-ping Chung
4e56f1c52d Take responsibility to remove incompatibilities 2021-04-04 20:39:28 +08:00
Tzu-ping Chung
9ceabb568f Add note to explain the cast 2021-04-03 16:25:38 +08:00
Tzu-ping Chung
0d39ae9734 Pull in resolvelib's typing information 2021-04-03 16:25:38 +08:00
Andrey Bienkowski
622f104694 Use f-strings for formatting
suggested by pyupgrade --py36-plus
2021-03-30 15:48:27 +03:00
Tzu-ping Chung
56a8f3d8bd Typing fixes 2021-03-10 16:40:58 +08:00
Tzu-ping Chung
80e0163e03
Merge pull request #9552
From uranusjr/new-resolver-requires-python-error
2021-03-08 02:26:20 +08:00
Blazej Michalik
d1d914597c
Refactor set(...){...}
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2021-02-28 00:41:04 +01:00
Tzu-ping Chung
d87abdfdfe Fix error reporting on Requires-Python conflicts 2021-02-28 07:31:39 +08:00