diff --git a/src/pip/_internal/cli/req_command.py b/src/pip/_internal/cli/req_command.py index bfe3136b0..29bbb8fe7 100644 --- a/src/pip/_internal/cli/req_command.py +++ b/src/pip/_internal/cli/req_command.py @@ -270,7 +270,7 @@ class RequirementCommand(IndexGroupCommand): py_version_info=py_version_info, ) - def populate_requirement_set( + def get_requirements( self, args, # type: List[str] options, # type: Values @@ -281,7 +281,7 @@ class RequirementCommand(IndexGroupCommand): ): # type: (...) -> List[InstallRequirement] """ - Marshal cmd line args into a requirement set. + Parse command-line arguments into the corresponding requirements. """ requirement_set = RequirementSet( check_supported_wheels=check_supported_wheels diff --git a/src/pip/_internal/commands/download.py b/src/pip/_internal/commands/download.py index ccc31a94f..5ad4b4544 100644 --- a/src/pip/_internal/commands/download.py +++ b/src/pip/_internal/commands/download.py @@ -101,7 +101,7 @@ class DownloadCommand(RequirementCommand): with get_requirement_tracker() as req_tracker, TempDirectory( options.build_dir, delete=build_delete, kind="download" ) as directory: - reqs = self.populate_requirement_set( + reqs = self.get_requirements( args, options, finder, diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index c2e5517bc..811ecbc39 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -292,7 +292,7 @@ class InstallCommand(RequirementCommand): options.build_dir, delete=build_delete, kind="install" ) as directory: try: - reqs = self.populate_requirement_set( + reqs = self.get_requirements( args, options, finder, session, wheel_cache, check_supported_wheels=not options.target_dir, ) diff --git a/src/pip/_internal/commands/wheel.py b/src/pip/_internal/commands/wheel.py index 67c8fd7f7..a5bf28c94 100644 --- a/src/pip/_internal/commands/wheel.py +++ b/src/pip/_internal/commands/wheel.py @@ -128,7 +128,7 @@ class WheelCommand(RequirementCommand): options.build_dir, delete=build_delete, kind="wheel" ) as directory: try: - reqs = self.populate_requirement_set( + reqs = self.get_requirements( args, options, finder, session, wheel_cache ) diff --git a/tests/unit/test_req.py b/tests/unit/test_req.py index 1c97bfef0..29a239262 100644 --- a/tests/unit/test_req.py +++ b/tests/unit/test_req.py @@ -169,7 +169,7 @@ class TestRequirementSet(object): command = create_command('install') with requirements_file('--require-hashes', tmpdir) as reqs_file: options, args = command.parse_args(['-r', reqs_file]) - command.populate_requirement_set( + command.get_requirements( args, options, finder, session, wheel_cache=None, ) assert options.require_hashes