Klaas van Schelven
5d7a1a68c7
Respect --no-index from the requirements file
...
See #11276
SearchScope was extended with an extra parameter to be able to pass-on the
value of no_index as we do with the other parameters. This allows us to respect
its value regardless of the order in which options are evaluated.
2022-07-20 15:55:17 +02:00
Stéphane Bidoul
bb2a3d7410
Remove the html5lib deprecated feature flag.
2022-07-16 19:37:11 +02: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
Jon Dufresne
bf5f4008e7
Replace vendored html5lib with stdlib
...
The html5lib library isn't strictly required as the same functionality
can be achieved through the stdlib html.parser module.
The html5lib is one of the largest uses of the six library. By dropping
this unnecessary dependency, the pip project is closer to dropping the
six library.
Additionally, html5lib maintenance has slowed down and the project has
rejected pull requests to drop Python 2 support.
For now, the html5lib code remains, but is gated behind a command
line option: `--use-deprecated=html5lib`. After a sufficient amount of
time has passed without any reported bugs, the vendored library and this
flag can be removed completely.
2022-01-28 06:45:57 +00: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
2528dc5926
fix unit test
2021-09-19 12:54:13 +07:00
Pradyun Gedam
585037a80a
Cleanup implicit string concatenation
2021-08-20 13:37:52 +01:00
Pradyun Gedam
94999255d5
Reformat the codebase, with black
2021-08-20 13:37:49 +01:00
Tzu-ping Chung
62f481679a
Move "Link requires a different Python" to verbose
2021-06-20 05:21:11 +08:00
Jim Fisher
3bd019b9f6
fix test after changing debug string
2021-02-19 10:58:14 +00:00
Jon Dufresne
cdcf74fb8e
Use f-strings for simple string formatting
...
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Jon Dufresne
2e38024991
Drop u prefix from str literals
...
Unnecessary since dropping Python 2 support.
This makes one test case from test_str_to_display a duplicate and so has
been removed.
2020-12-25 07:26:06 -08:00
Tzu-ping Chung
367e6617bd
Move yanked message unit tests to use resolver
2020-04-25 03:53:53 +08:00
Pradyun Gedam
3fa356a772
Update references to pep425tags
2020-02-26 10:24:43 -08:00
Pradyun Gedam
611fc6069b
Update references to collector.py
2019-10-19 22:24:53 +05:30
Pradyun Gedam
2db6f428bf
Update imports to {index -> index.package_finder}
2019-10-19 22:24:01 +05:30
Chris Hunt
cf7ebdbbc2
Move PipSession to network.session
2019-09-27 01:02:52 -04:00
Christopher Hunt
b0a6428d3b
Merge pull request #7023 from chrahunt/maint/remove-lockfile-dependency
...
Remove Lockfile
2019-09-19 00:23:57 -04:00
Chris Jerdonek
6d94944efd
Change PackageFinder.create() to accept a LinkCollector.
2019-09-18 00:59:04 -07:00
Chris Hunt
ddfe2be362
Fix unrelated test.
2019-09-16 12:51:30 -04:00
Chris Jerdonek
fe2509bd58
Move LinkCollector to a new collector.py module.
2019-09-14 02:54:07 -07:00
Chris Jerdonek
12a27d0c9f
Add a couple tests.
2019-09-12 02:31:42 -07:00
Chris Jerdonek
ed55cde689
Add LinkCollector class to index.py.
2019-09-10 10:13:02 -07:00
Albert Tugushev
a9d23fadbb
Use pytest.param to skip certain parametrizations ( #6944 )
2019-08-31 17:13:44 +02:00
Chris Jerdonek
d20e02e728
Change PackageFinder._sort_locations() to a group_locations() function.
2019-08-23 07:53:52 -07:00
Chris Jerdonek
1ab37d31f1
Merge pull request #6903 from cjerdonek/move-trusted-hosts
...
Move PackageFinder's --trusted-host logic to PipSession
2019-08-22 03:56:13 -07:00
Chris Jerdonek
a6cdb490b0
Move trusted_hosts logic to PipSession.
2019-08-21 03:03:17 -07:00
Chris Jerdonek
06d786dee1
Add a test for compute_best_candidate() returning a None best candidate.
2019-08-20 22:49:30 -07:00
Chris Jerdonek
6554273fe5
Pass the best candidate to BestCandidateResult instead of CandidateEvaluator.
2019-08-20 22:49:30 -07:00
Chris Jerdonek
e8eda16ed8
Rename some PackageFinder "best candidate" classes and methods:
...
* Rename FoundCandidates to BestCandidateResult.
* Rename CandidateEvaluator's make_found_candidates() to
compute_best_candidate().
* Rename CandidateEvaluator's get_best_candidate() to
sort_best_candidate().
* Rename PackageFinder's find_candidates() to find_best_candidate().
2019-08-20 22:49:30 -07:00
Pradyun Gedam
537b0fca12
Change isort multi_line_output to 3
2019-07-22 10:15:27 +05:30
Chris Jerdonek
2de38044bb
Pass the specifier to CandidateEvaluator.create().
2019-07-16 01:09:14 -07:00
Chris Jerdonek
3cf192ff1b
Add debug logging to filter_unallowed_hashes().
2019-07-14 10:56:07 -07:00
Chris Jerdonek
0d96a49cf7
Add project_name to CandidateEvaluator.
2019-07-14 10:56:00 -07:00
Chris Jerdonek
74504fff6c
Prefer candidates with allowed hashes when sorting.
2019-07-14 02:50:51 -07:00
Chris Jerdonek
9ddc89a21d
Pass the hashes when creating the CandidateEvaluator.
2019-07-14 02:50:51 -07:00
Chris Jerdonek
e80fc233ff
Add filter_unallowed_hashes().
2019-07-14 02:50:48 -07:00
Chris Jerdonek
4a9e306678
Add get_applicable_candidates(), and test.
2019-07-07 14:35:56 -07:00
Chris Jerdonek
b2389bf8c7
Add CandidatePreferences and PackageFinder.make_candidate_evaluator().
2019-07-07 14:35:50 -07:00
Chris Jerdonek
9d3d369834
Simplify FoundCandidates.
2019-07-06 01:08:51 -07:00
Chris Jerdonek
cf6f882392
Add test_make_found_candidates().
2019-07-06 00:52:15 -07:00
Chris Jerdonek
979c8405d2
Add LinkEvaluator class.
2019-07-04 16:54:29 -07:00
Chris Jerdonek
ba2c382511
Merge pull request #6660 from cjerdonek/rename-egg-info-matches
...
Rename _egg_info_matches()
2019-06-30 15:00:49 -07:00
Chris Jerdonek
2f1be4e6ec
Rename index.py's _egg_info_matches(egg_info, canonical_name).
2019-06-30 12:51:09 -07:00
Chris Jerdonek
ae79b5bf5c
Add a SelectionPreferences class.
2019-06-28 11:14:55 -07:00
Chris Jerdonek
d3b3f16871
Support yanked reasons with non-ascii characters.
2019-06-27 22:53:58 -07:00
Chris Jerdonek
8af3f21a57
Filter out yanked links earlier when allow_yanked=False.
2019-06-27 19:50:25 -07:00