Skip to content

Commit 11b0654

Browse files
authored
Merge pull request #11229 from uranusjr/pip-deprecation-warning
PipDeprecationWarning subclass DeprecationWarning
2 parents c260ecc + f1bc96a commit 11b0654

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

news/11225.feature.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pip's deprecation warnings now suclass the built-in ``DeprecationWarning``, and
2+
can be suppressed by running the Python interpreter with
3+
``-W ignore::DeprecationWarning``.

src/pip/_internal/utils/deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
DEPRECATION_MSG_PREFIX = "DEPRECATION: "
1414

1515

16-
class PipDeprecationWarning(Warning):
16+
class PipDeprecationWarning(DeprecationWarning):
1717
pass
1818

1919

0 commit comments

Comments
 (0)