diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py index 4c16b9cae..38f9f063d 100644 --- a/src/pip/_internal/commands/install.py +++ b/src/pip/_internal/commands/install.py @@ -529,14 +529,16 @@ class InstallCommand(RequirementCommand): parts = [] # type: List[str] if resolver_variant == "legacy": parts.append( - "After October 2020 you may experience errors when installing " - "or updating packages. This is because pip will change the " - "way that it resolves dependency conflicts.\n" + "pip's legacy dependency resolver does not consider dependency " + "conflicts when selecting packages. This behaviour is the " + "source of the following dependency conflicts." ) + else: + assert resolver_variant == "2020-resolver" parts.append( - "We recommend you use --use-feature=2020-resolver to test " - "your packages with the new resolver before it becomes the " - "default.\n" + "pip's dependency resolver does not currently take into account " + "all the packages that are installed. This behaviour is the " + "source of the following dependency conflicts." ) # NOTE: There is some duplication here, with commands/check.py @@ -557,7 +559,7 @@ class InstallCommand(RequirementCommand): version = package_set[project_name][0] for dep_name, dep_version, req in conflicting[project_name]: message = ( - "{name} {version} requires {requirement}, but you'll have " + "{name} {version} requires {requirement}, but {you} have " "{dep_name} {dep_version} which is incompatible." ).format( name=project_name, @@ -565,6 +567,7 @@ class InstallCommand(RequirementCommand): requirement=req, dep_name=dep_name, dep_version=dep_version, + you=("you" if resolver_variant == "2020-resolver" else "you'll") ) parts.append(message) diff --git a/tests/functional/test_install_check.py b/tests/functional/test_install_check.py index a173cb550..56ac7daf6 100644 --- a/tests/functional/test_install_check.py +++ b/tests/functional/test_install_check.py @@ -89,7 +89,7 @@ def test_check_install_does_not_warn_for_out_of_graph_issues(script): assert_contains_expected_lines(result.stderr, [ "broken 1.0 requires missing, which is not installed.", "broken 1.0 requires conflict<1.0, " - "but you'll have conflict 1.0 which is incompatible." + "but you have conflict 1.0 which is incompatible." ]) # Install unrelated package