We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1a7a6f commit 4428130Copy full SHA for 4428130
src/pip/_internal/cli/main.py
@@ -4,6 +4,7 @@
4
import logging
5
import os
6
import sys
7
+import warnings
8
from typing import List, Optional
9
10
from pip._internal.cli.autocompletion import autocomplete
@@ -46,6 +47,14 @@ def main(args: Optional[List[str]] = None) -> int:
46
47
if args is None:
48
args = sys.argv[1:]
49
50
+ # Suppress the pkg_resources deprecation warning
51
+ # Note - we use a module of .*pkg_resources to cover
52
+ # the normal case (pip._vendor.pkg_resources) and the
53
+ # devendored case (a bare pkg_resources)
54
+ warnings.filterwarnings(
55
+ action="ignore", category=DeprecationWarning, module=".*pkg_resources"
56
+ )
57
+
58
# Configure our deprecation warnings to be sent through loggers
59
deprecation.install_warning_logger()
60
0 commit comments