Commit Graph

156 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Sander Van Balen 89b68c6bf9 Merge branch 'main' into issue/11924-requirements-on-extras 2023-09-13 15:20:25 +02:00
Pradyun Gedam 0db5d95da0
Merge branch 'main' into extra-normalization 2023-09-10 10:19:13 +01:00
Sander Van Balen 952ab6d837
Update src/pip/_internal/resolution/resolvelib/factory.py
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2023-09-07 10:31:49 +02:00
Sander Van Balen 449522a828 minor fixes and linting 2023-09-06 15:16:22 +02:00
Sander Van Balen 50cd318cef review comment: renamed and moved up ExtrasCandidate._ireq 2023-09-06 15:06:19 +02:00
Sander Van Balen 4e73e3e96e review comment: subclass instead of constructor flag 2023-09-06 14:39:51 +02:00
Sander Van Balen 0de374e4df review comment: return iterator instead of list 2023-09-06 13:52:41 +02:00
Sander Van Balen 3f3ae6f24d Merge branch 'main' into issue/11924-requirements-on-extras 2023-09-06 10:24:11 +02: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
Sander Van Balen 39e1102800 fixed minor type errors 2023-07-25 17:33:09 +02:00
Sander Van Balen dc01a40d41 py38 compatibility 2023-07-25 17:19:21 +02:00
Sander Van Balen 3160293193 improvement 2023-06-22 16:10:09 +02:00
Sander Van Balen cb0f97f70e reverted troublesome changes 2023-06-22 15:56:23 +02:00
Sander Van Balen 49027d7de3 cleanup 2023-06-22 14:59:43 +02:00
Sander Van Balen 5f8f40eb1d refinements 2023-06-22 11:08:33 +02:00
Sander Van Balen 937d8f0b61 partial improvement 2023-06-21 17:34:30 +02:00
Sander Van Balen 5bebe850ea take non-extra requirements into account for extra installs 2023-06-20 17:13:18 +02: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