summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradyun Gedam <pradyunsg@users.noreply.github.com>2021-07-29 00:00:48 +0100
committerPradyun Gedam <pradyunsg@users.noreply.github.com>2021-08-15 19:15:53 +0100
commit71205909353cf71278ab69274ab3749a60cab2bc (patch)
tree5a91e28f45f6748d1d017f37ab34a482b988c1a2
parentd23d12b9d80d1ecb7d99955f35eca22587cdf531 (diff)
downloadpip-71205909353cf71278ab69274ab3749a60cab2bc.tar.gz
Tweak wording in deprecation messages
- Avoid a period at the end of `issue` line. - Change post-gone message wording.
-rw-r--r--src/pip/_internal/utils/deprecation.py6
-rw-r--r--tests/unit/test_utils.py5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/pip/_internal/utils/deprecation.py b/src/pip/_internal/utils/deprecation.py
index a5e2ad368..a9df8296a 100644
--- a/src/pip/_internal/utils/deprecation.py
+++ b/src/pip/_internal/utils/deprecation.py
@@ -89,7 +89,7 @@ def deprecated(
gone_in,
"pip {} will enforce this behaviour change."
if not is_gone
- else "This behavior change has been enforced since pip {}.",
+ else "Since pip {}, this is no longer supported.",
),
(
replacement,
@@ -101,7 +101,7 @@ def deprecated(
),
(
issue,
- "Discussion can be found at https://github.com/pypa/pip/issues/{}.",
+ "Discussion can be found at https://github.com/pypa/pip/issues/{}",
),
]
@@ -111,7 +111,7 @@ def deprecated(
if value is not None
)
- # Raise as an error if this behaviour is no longer supported.
+ # Raise as an error if this behaviour is deprecated.
if is_gone:
raise PipDeprecationWarning(message)
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index 0232d2235..f96a2bff6 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -934,10 +934,9 @@ def test_deprecated_message_reads_well():
assert message == (
"DEPRECATION: Stop doing this! "
- "This behavior change has been enforced since pip 1.0. "
+ "Since pip 1.0, this is no longer supported. "
"A possible replacement is to be nicer. "
- "Discussion can be found at "
- "https://github.com/pypa/pip/issues/100000."
+ "Discussion can be found at https://github.com/pypa/pip/issues/100000"
)