Skip to content

Commit

Permalink
Improve text of resolver warning (#1776)
Browse files Browse the repository at this point in the history
* Correct the grammar.
* Make the source of the warning clearer to the reader.
  • Loading branch information
StevenMaude authored Dec 14, 2022
1 parent 49a6720 commit 2aebb64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions piptools/scripts/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,10 @@ def cli(

if resolver_name == "legacy":
log.warning(
"WARNING: using legacy resolver is deprecated and will be removed in "
"future versions. The default resolver will be change to 'backtracking' "
"in 7.0.0 version. Specify --resolver=backtracking to silence this warning."
"WARNING: the legacy dependency resolver is deprecated and will be removed"
" in future versions of pip-tools. The default resolver will be changed to"
" 'backtracking' in pip-tools 7.0.0. Specify --resolver=backtracking to"
" silence this warning."
)

###
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ def test_print_deprecation_warning_if_using_legacy_resolver(runner, current_reso
out = runner.invoke(cli)
assert out.exit_code == 0, out

expected_warning = "WARNING: using legacy resolver is deprecated"
expected_warning = "WARNING: the legacy dependency resolver is deprecated"
if current_resolver == "legacy":
assert expected_warning in out.stderr
else:
Expand Down

0 comments on commit 2aebb64

Please sign in to comment.