diff --git a/news/11225.feature.rst b/news/11225.feature.rst new file mode 100644 index 00000000000..4e1ecec50db --- /dev/null +++ b/news/11225.feature.rst @@ -0,0 +1,3 @@ +pip's deprecation warnings now suclass the built-in ``DeprecationWarning``, and +can be suppressed by running the Python interpreter with +``-W ignore::DeprecationWarning``. diff --git a/src/pip/_internal/utils/deprecation.py b/src/pip/_internal/utils/deprecation.py index 72bd6f25a55..7964095ffde 100644 --- a/src/pip/_internal/utils/deprecation.py +++ b/src/pip/_internal/utils/deprecation.py @@ -13,7 +13,7 @@ DEPRECATION_MSG_PREFIX = "DEPRECATION: " -class PipDeprecationWarning(Warning): +class PipDeprecationWarning(DeprecationWarning): pass