Skip to content

Commit

Permalink
FIX: Remove deprecation warning from vendored pkg_resources
Browse files Browse the repository at this point in the history
Leave a comment to flag the change for the next time setuptools is
vendored.

Fixes pypagh-12243.
  • Loading branch information
effigies committed Apr 29, 2024
1 parent e884c00 commit a3d562f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pip/_vendor/pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,10 @@
_namespace_packages = None


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


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

0 comments on commit a3d562f

Please sign in to comment.