Skip to content

Commit

Permalink
Merge pull request #11493 from pradyunsg/remove-2020-resolver-opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Oct 15, 2022
2 parents 1fcc3ce + 7662593 commit e86f27f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions news/11493.removal.rst
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit e86f27f

Please sign in to comment.