Skip to content

Commit a3d562f

Browse files
committed
FIX: Remove deprecation warning from vendored pkg_resources
Leave a comment to flag the change for the next time setuptools is vendored. Fixes pypagh-12243.
1 parent e884c00 commit a3d562f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/pip/_vendor/pkg_resources/__init__.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@
101101
_namespace_packages = None
102102

103103

104-
warnings.warn(
105-
"pkg_resources is deprecated as an API. "
106-
"See https://setuptools.pypa.io/en/latest/pkg_resources.html",
107-
DeprecationWarning,
108-
stacklevel=2,
109-
)
104+
# Patch: Remove deprecation warning from vendored pkg_resources.
105+
# Setting PYTHONWARNINGS=error to verify builds produce no warnings
106+
# causes immediate exceptions.
107+
# See https://github.com/pypa/pip/issues/12243
110108

111109

112110
_PEP440_FALLBACK = re.compile(r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)

0 commit comments

Comments
 (0)