summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradyun Gedam <pradyunsg@users.noreply.github.com>2022-10-07 11:56:34 +0100
committerPradyun Gedam <pradyunsg@users.noreply.github.com>2022-10-07 11:57:02 +0100
commit6421ab59d57522714183c731c05179e530cfcbc5 (patch)
tree17c0f66cc5d9f1fc10f01d4fa15df1cdd21bd3b4
parentfe78726b36953707f9c0ae23350d49127f12f6c3 (diff)
downloadpip-6421ab59d57522714183c731c05179e530cfcbc5.tar.gz
Remove the opt-in for `2020-resolver`
This has been the default for quite some time now.
-rw-r--r--src/pip/_internal/cli/base_command.py7
-rw-r--r--src/pip/_internal/cli/cmdoptions.py1
-rw-r--r--tests/unit/test_req_file.py12
3 files changed, 10 insertions, 10 deletions
diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py
index 0774f2608..5bd7e67e6 100644
--- a/src/pip/_internal/cli/base_command.py
+++ b/src/pip/_internal/cli/base_command.py
@@ -151,13 +151,6 @@ class Command(CommandContextMixIn):
)
options.cache_dir = None
- if "2020-resolver" in options.features_enabled:
- logger.warning(
- "--use-feature=2020-resolver no longer has any effect, "
- "since it is now the default dependency resolver in pip. "
- "This will become an error in pip 21.0."
- )
-
def intercepts_unhandled_exc(
run_func: Callable[..., int]
) -> Callable[..., int]:
diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py
index 9ff7a3d07..b4e2560de 100644
--- a/src/pip/_internal/cli/cmdoptions.py
+++ b/src/pip/_internal/cli/cmdoptions.py
@@ -983,7 +983,6 @@ use_new_feature: Callable[..., Option] = partial(
action="append",
default=[],
choices=[
- "2020-resolver",
"fast-deps",
"truststore",
"no-binary-enable-wheel-cache",
diff --git a/tests/unit/test_req_file.py b/tests/unit/test_req_file.py
index fde0cb2f7..228d0aaa4 100644
--- a/tests/unit/test_req_file.py
+++ b/tests/unit/test_req_file.py
@@ -459,8 +459,16 @@ class TestProcessLine:
self, line_processor: LineProcessor, options: mock.Mock
) -> None:
"""--use-feature can be set in requirements files."""
- line_processor("--use-feature=2020-resolver", "filename", 1, options=options)
- assert "2020-resolver" in options.features_enabled
+ line_processor("--use-feature=fast-deps", "filename", 1, options=options)
+
+ def test_use_feature_with_error(
+ self, line_processor: LineProcessor, options: mock.Mock
+ ) -> None:
+ """--use-feature triggers error when parsing requirements files."""
+ with pytest.raises(RequirementsFileParseError):
+ line_processor(
+ "--use-feature=2020-resolver", "filename", 1, options=options
+ )
def test_relative_local_find_links(
self,