Commit Graph

184 Commits

Author SHA1 Message Date
Nguyễn Gia Phong 6887b0795b Merge usage of download_dir and wheel_download_dir
In every cases, at least one of them is None.  By doing this,
it is also possible to simplify wrapper codes around download_dir.
2020-10-07 13:42:21 +07:00
Pradyun Gedam 4c534e65d2
Tweak message when -r is not passed on a requirements.txt 2020-09-23 19:46:36 +05:30
Nguyễn Gia Phong b46576d933 Give batch downloader a separate class 2020-08-12 16:07:27 +07:00
Nguyễn Gia Phong 487d00295c Define RequirementPreparer._session 2020-08-06 18:42:59 +07:00
Chris Hunt f0d4df10eb Propagate lazy_wheel option through RequirementPreparer
Reduces dependence on Candidate (and Resolver (and Factory)).
2020-08-02 18:40:11 -04:00
Stéphane Bidoul b9a19f6be0
Rename is_direct to user_supplied 2020-05-31 18:33:51 +02:00
Devesh Kumar Singh ac39efa537 Update parse_editable to return Set[str] 2020-05-22 04:21:14 +05:30
Stéphane Bidoul 076d1a8ed8
Fix tests that build fake InstallRequirements with source_dir 2020-04-12 11:39:09 +02:00
Tzu-ping Chung 6db0df928c Move wheel cache out of InstallRequirment 2020-03-30 17:36:03 +08:00
Jason R. Coombs 3511d3d493 Convert the remaining '%' formatters to '.format'. Fixes #6973. 2020-03-06 12:43:03 -05:00
Chris Hunt fd74d0362c Move legacy_resolve to resolution.legacy.resolver
This gives us a concrete place to put the new resolver code and
resolver-specific modules (`resolution.resolver`).

The reason for another level of hierarchy compared to other modules
is to allow us to move other modules here as they
become implementation details of the legacy resolver. Examples I
have in mind are: `req.req_set`, `req.req_install`,
`req.constructors`, and `operations.prepare`.
2020-02-25 09:04:06 -05:00
Christopher Hunt 40523794d8
Merge pull request #7747 from pfmoore/parsed_requirement
Refactor parse_requirements to be independent of InstallRequirement
2020-02-24 00:21:28 +08:00
Anudit Nagar 082c0f01d2
Update old-style formatting to new-style formatting (#7762) 2020-02-21 21:48:14 +05:30
Paul Moore aac5d821f9 Move make_requirement to pip._internal.req.constructors (and rename it) 2020-02-14 12:22:50 +00:00
Paul Moore e2a57fd1e6 Refactor to reduce coupling.
* Make ParsedLine record the type of line
* Split handle_line to allow passing arguments only where needed
* Remove unneeded attributes from ParsedRequirement
2020-02-14 09:56:42 +00:00
Paul Moore f2e49b3946 Use a new ParsedRequirement class to communicate between handle_line and parse_requirements 2020-02-13 10:39:17 +00:00
Chris Hunt e7998a3617 Rename populate_requirement_set to get_requirements 2020-02-05 22:30:07 -05:00
Chris Hunt de5ec7e884 Remove unused requirement_set argument 2020-02-05 22:30:07 -05:00
Chris Hunt fd815bc1fa Pass in a plain list of InstallRequirement to Resolver.resolve
Further simplifies the Resolver interface, and will give us the
opportunity to remove any knowledge of RequirementSet from the
individual commands.
2020-02-05 22:30:05 -05:00
Chris Hunt 550ae907bd Parameterize check_supported_wheels to Resolver.resolve
This reduces our dependence on the input RequirementSet.
2020-02-05 22:29:46 -05:00
Chris Hunt 58c06299db Return a different RequirementSet from Resolver.resolve
This makes the resolver interface simpler by returning a brand new
RequirementSet vs mutating the one that was input to the function, and
will let us specialize RequirementSet for the different use cases.
2020-02-05 22:29:30 -05:00
Chris Hunt 24d2f1e719 Remove unused arguments 2019-12-05 20:29:43 -05:00
Chris Hunt 7db57478a2 Construct Downloader outside RequirementPreparer
Reduces RequirementPreparer responsibilities, and will let us get rid of
some constructor arguments.
2019-12-05 20:26:53 -05:00
Pradyun Gedam 1405a403fe
Merge branch 'master' into add-use-user-site-to-preparer 2019-11-11 08:40:20 +05:30
Pradyun Gedam c9606b86e1
Add use_user_site to RequirementPreparer 2019-11-10 13:51:29 +05:30
Pradyun Gedam 1b07d3e797
Rewrap strings to 80 characters 2019-11-10 12:38:29 +05:30
Pradyun Gedam f39ce3439b
Update tests to correctly enter RequirementTracker context 2019-11-10 12:38:08 +05:30
Pradyun Gedam bb197e12bf
Move make_install_req definition to top of function
Why: Makes the diff for the next commit cleaner
2019-11-10 12:34:59 +05:30
Pradyun Gedam c40a9d332d
Update callsites for RequirementTracker 2019-11-10 12:33:25 +05:30
Chris Hunt 9775387e41 Move unit test to functional test for implicit hash checking 2019-11-09 16:30:44 -05:00
Chris Hunt e4a7276ea0 Explicitly require hashes for tests that expect it
The purpose of these tests is not to check implicit hash-checking mode,
so we can be explicit.
2019-11-09 16:12:05 -05:00
Chris Hunt 7f8c25dbbb Fix call to Resolver/Preparer in tests 2019-11-09 16:11:43 -05:00
Christopher Hunt d3129f227a
Merge pull request #7301 from chrahunt/refactor/reduce-resolver-finder-dependence
Reduce Resolver dependence on PackageFinder
2019-11-06 14:17:55 +08:00
Chris Hunt deac2343dc Don't pass PackageFinder to Preparer from Resolver
Preparer's overall responsibilities align more with having its own
reference to finder, which will help us remove it from resolver later.
2019-11-05 20:57:14 -05:00
Pradyun Gedam 54fc70d212
Stop generating metadata as part of a unit test 2019-11-04 14:30:20 +05:30
Chris Hunt 3076c39f25 Remove unused Resolver.session 2019-11-03 14:31:38 -05:00
Chris Hunt 44cc3aeb0a Use session from RequirePreparer, not Resolver 2019-11-03 14:26:47 -05:00
Chris Hunt 85918afc5e Remove req_file.process_line and update tests
The behavior that was in process_line was moved to
RequirementsFileParser so it's no longer needed, we just had to
move the remaining tests to use the higher-level parse_requirements
interface.
2019-10-26 13:53:01 -04:00
Chris Hunt b8fb97a815 Remove unused RequirementSet.require_hashes 2019-10-13 13:19:49 -04:00
Chris Hunt bbc29f0c6c Pass require_hashes directly to Resolver
This removes some of the dependence of the Resolver on our specific
RequirementSet implementation.
2019-10-13 13:19:49 -04:00
Pradyun Gedam 37bc629551
Rename tests.lib.path.Path.{abspath -> resolve()} 2019-10-07 18:01:06 +05:30
Pradyun Gedam 03392873ec
Refactor metadata directory handling (#7087) 2019-09-28 17:34:43 +05:30
Chris Hunt cf7ebdbbc2 Move PipSession to network.session 2019-09-27 01:02:52 -04:00
Pradyun Gedam b01f301c75
Update get_dist to directly use metadata_directory 2019-09-27 10:32:25 +05:30
Chris Jerdonek 0435316fde Move path_to_url() to utils/urls.py. 2019-09-24 02:01:52 -07:00
Christopher Hunt 82c2dd40eb
Merge pull request #6203 from vinicyusmacedo/fix-pep-508
Fix is_url from splitting the scheme incorrectly when using PEP 440's direct references
2019-09-16 09:52:40 -04:00
Chris Jerdonek 084d797947
Merge pull request #6910 from cjerdonek/link-collector
Split out a LinkCollector class from PackageFinder
2019-09-13 08:50:05 -07:00
Chris Jerdonek ed55cde689 Add LinkCollector class to index.py. 2019-09-10 10:13:02 -07:00
Pradyun Gedam ceaf514189
Drop support for EOL Python 3.4 (2) (#6782)
Merge pull request #6782 from hugovk/rm-3.4
2019-09-10 09:28:11 +05:30
Chris Hunt 7514a50e1d Remove unused arguments from Resolver constructor. 2019-09-06 18:53:35 -04:00