File tree Expand file tree Collapse file tree 3 files changed +25
-6
lines changed
src/pip/_vendor/pkg_resources Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Original file line number Diff line number Diff line change
1
+ Remove (suppressed) deprecation warning from vendored ``pkg_resources ``
2
+ to ensure builds succeed with ``PYTHONWARNINGS=error ``.
Original file line number Diff line number Diff line change 99
99
_namespace_packages = None
100
100
101
101
102
- warnings .warn (
103
- "pkg_resources is deprecated as an API. "
104
- "See https://setuptools.pypa.io/en/latest/pkg_resources.html" ,
105
- DeprecationWarning ,
106
- stacklevel = 2 ,
107
- )
102
+ # Patch: Remove deprecation warning from vendored pkg_resources.
103
+ # Setting PYTHONWARNINGS=error to verify builds produce no warnings
104
+ # causes immediate exceptions.
105
+ # See https://github.com/pypa/pip/issues/12243
108
106
109
107
110
108
_PEP440_FALLBACK = re .compile (r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)" , re .I )
Original file line number Diff line number Diff line change @@ -11,3 +11,22 @@ index 3f2476a0c..8d5727d35 100644
11
11
yield_lines,
12
12
drop_comment,
13
13
join_continuation,
14
+ --- a/src/pip/_vendor/pkg_resources/__init__.py
15
+ +++ b/src/pip/_vendor/pkg_resources/__init__.py
16
+ @@ -101,12 +101,10 @@ _namespace_handlers = None
17
+ _namespace_packages = None
18
+
19
+
20
+ - warnings.warn(
21
+ - "pkg_resources is deprecated as an API. "
22
+ - "See https://setuptools.pypa.io/en/latest/pkg_resources.html",
23
+ - DeprecationWarning,
24
+ - stacklevel=2,
25
+ - )
26
+ + # Patch: Remove deprecation warning from vendored pkg_resources.
27
+ + # Setting PYTHONWARNINGS=error to verify builds produce no warnings
28
+ + # causes immediate exceptions.
29
+ + # See https://github.com/pypa/pip/issues/12243
30
+
31
+
32
+ _PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)
You can’t perform that action at this time.
0 commit comments