Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the opt-in for 2020-resolver #11493

Merged
merged 2 commits into from Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions news/11493.removal.rst
@@ -0,0 +1 @@
Remove ``--use-feature=2020-resolver`` opt-in flag. This was supposed to be removed in 21.0, but missed during that release cycle.
7 changes: 0 additions & 7 deletions src/pip/_internal/cli/base_command.py
Expand Up @@ -151,13 +151,6 @@ def _main(self, args: List[str]) -> int:
)
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]:
Expand Down
1 change: 0 additions & 1 deletion src/pip/_internal/cli/cmdoptions.py
Expand Up @@ -983,7 +983,6 @@ def check_list_path_option(options: Values) -> None:
action="append",
default=[],
choices=[
"2020-resolver",
"fast-deps",
"truststore",
"no-binary-enable-wheel-cache",
Expand Down
12 changes: 10 additions & 2 deletions tests/unit/test_req_file.py
Expand Up @@ -459,8 +459,16 @@ def test_use_feature(
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,
Expand Down