From b05c66722e02bbdbef0aa328bc19b881f309ece3 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Fri, 24 May 2019 20:30:13 -0400 Subject: [PATCH 1/2] Move Resolver to a legacy_resolve module --- src/pip/_internal/commands/download.py | 2 +- src/pip/_internal/commands/install.py | 2 +- src/pip/_internal/commands/wheel.py | 2 +- src/pip/_internal/{resolve.py => legacy_resolve.py} | 0 tests/unit/test_req.py | 2 +- tests/unit/test_resolve.py | 4 ++-- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/pip/_internal/{resolve.py => legacy_resolve.py} (100%) diff --git a/src/pip/_internal/commands/download.py b/src/pip/_internal/commands/download.py index a57e4bc4cb8..a5e9b840f9a 100644 --- a/src/pip/_internal/commands/download.py +++ b/src/pip/_internal/commands/download.py @@ -5,10 +5,10 @@ from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import RequirementCommand +from pip._internal.legacy_resolve import Resolver from pip._internal.operations.prepare import RequirementPreparer from pip._internal.req import RequirementSet from pip._internal.req.req_tracker import RequirementTracker -from pip._internal.resolve import Resolver from pip._internal.utils.filesystem import check_path_owner from pip._internal.utils.misc import ensure_dir, normalize_path from pip._internal.utils.temp_dir import TempDirectory diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index 51a657e476d..a646991bbb4 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -16,12 +16,12 @@ from pip._internal.exceptions import ( CommandError, InstallationError, PreviousBuildDirError, ) +from pip._internal.legacy_resolve import Resolver from pip._internal.locations import distutils_scheme, virtualenv_no_global from pip._internal.operations.check import check_install_conflicts from pip._internal.operations.prepare import RequirementPreparer from pip._internal.req import RequirementSet, install_given_reqs from pip._internal.req.req_tracker import RequirementTracker -from pip._internal.resolve import Resolver from pip._internal.utils.filesystem import check_path_owner from pip._internal.utils.misc import ( ensure_dir, get_installed_version, diff --git a/src/pip/_internal/commands/wheel.py b/src/pip/_internal/commands/wheel.py index cd72a3df1a7..168ca12f64f 100644 --- a/src/pip/_internal/commands/wheel.py +++ b/src/pip/_internal/commands/wheel.py @@ -8,10 +8,10 @@ from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import RequirementCommand from pip._internal.exceptions import CommandError, PreviousBuildDirError +from pip._internal.legacy_resolve import Resolver from pip._internal.operations.prepare import RequirementPreparer from pip._internal.req import RequirementSet from pip._internal.req.req_tracker import RequirementTracker -from pip._internal.resolve import Resolver from pip._internal.utils.temp_dir import TempDirectory from pip._internal.wheel import WheelBuilder diff --git a/src/pip/_internal/resolve.py b/src/pip/_internal/legacy_resolve.py similarity index 100% rename from src/pip/_internal/resolve.py rename to src/pip/_internal/legacy_resolve.py diff --git a/tests/unit/test_req.py b/tests/unit/test_req.py index 15ac84df20b..91a9cbed678 100644 --- a/tests/unit/test_req.py +++ b/tests/unit/test_req.py @@ -15,6 +15,7 @@ HashErrors, InstallationError, InvalidWheelFilename, PreviousBuildDirError, ) from pip._internal.index import PackageFinder +from pip._internal.legacy_resolve import Resolver from pip._internal.operations.prepare import RequirementPreparer from pip._internal.req import InstallRequirement, RequirementSet from pip._internal.req.constructors import ( @@ -22,7 +23,6 @@ ) from pip._internal.req.req_file import process_line from pip._internal.req.req_tracker import RequirementTracker -from pip._internal.resolve import Resolver from tests.lib import DATA_DIR, assert_raises_regexp, requirements_file diff --git a/tests/unit/test_resolve.py b/tests/unit/test_resolve.py index 91d39c65e08..e384e2349a7 100644 --- a/tests/unit/test_resolve.py +++ b/tests/unit/test_resolve.py @@ -4,7 +4,7 @@ from mock import patch from pip._internal.exceptions import UnsupportedPythonVersion -from pip._internal.resolve import _check_dist_requires_python +from pip._internal.legacy_resolve import _check_dist_requires_python class FakeDist(object): @@ -18,7 +18,7 @@ def dist(): return FakeDist('my-project') -@patch('pip._internal.resolve.get_requires_python') +@patch('pip._internal.legacy_resolve.get_requires_python') class TestCheckDistRequiresPython(object): """ From d5c4fcc39c7d05833d76f6985372353d6d618fac Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 25 May 2019 12:44:45 -0400 Subject: [PATCH 2/2] Rename test_{resolve -> legacy_resolve}.py --- tests/unit/{test_resolve.py => test_legacy_resolve.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/unit/{test_resolve.py => test_legacy_resolve.py} (100%) diff --git a/tests/unit/test_resolve.py b/tests/unit/test_legacy_resolve.py similarity index 100% rename from tests/unit/test_resolve.py rename to tests/unit/test_legacy_resolve.py