Vendoring in pip 22.2.2

This commit is contained in:
Matt Davis
2022-08-07 18:09:17 -04:00
committed by Oz N Tiram
parent d791db89a7
commit a93e4a3bd7
7 changed files with 11 additions and 13 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
pip==22.2.1
pip==22.2.2
pipfile==0.0.2
safety==1.10.3
+1 -1
View File
@@ -1,6 +1,6 @@
from typing import List, Optional
__version__ = "22.2.1"
__version__ = "22.2.2"
def main(args: Optional[List[str]] = None) -> int:
-1
View File
@@ -30,7 +30,6 @@ class PipImportRedirectingFinder:
return spec
# TODO https://github.com/pypa/pip/issues/11294
sys.meta_path.insert(0, PipImportRedirectingFinder())
assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module"
@@ -345,6 +345,7 @@ def parse_links(page: "IndexContent") -> Iterable[Link]:
yanked_reason=yanked_reason,
hashes=file.get("hashes", {}),
)
return
parser = HTMLLinkParser(page.url)
encoding = page.encoding or "utf-8"
@@ -60,6 +60,12 @@ def _should_use_sysconfig() -> bool:
_USE_SYSCONFIG = _should_use_sysconfig()
if not _USE_SYSCONFIG:
# Import distutils lazily to avoid deprecation warnings,
# but import it soon enough that it is in memory and available during
# a pip reinstall.
from . import _distutils
# Be noisy about incompatibilities if this platforms "should" be using
# sysconfig, but is explicitly opting out and using distutils instead.
if _USE_SYSCONFIG_DEFAULT and not _USE_SYSCONFIG:
@@ -241,8 +247,6 @@ def get_scheme(
if _USE_SYSCONFIG:
return new
from . import _distutils
old = _distutils.get_scheme(
dist_name,
user=user,
@@ -407,8 +411,6 @@ def get_bin_prefix() -> str:
if _USE_SYSCONFIG:
return new
from . import _distutils
old = _distutils.get_bin_prefix()
if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="bin_prefix"):
_log_context()
@@ -442,8 +444,6 @@ def get_purelib() -> str:
if _USE_SYSCONFIG:
return new
from . import _distutils
old = _distutils.get_purelib()
if _looks_like_deb_system_dist_packages(old):
return old
@@ -488,8 +488,6 @@ def get_prefixed_libs(prefix: str) -> List[str]:
if _USE_SYSCONFIG:
return _deduplicated(new_pure, new_plat)
from . import _distutils
old_pure, old_plat = _distutils.get_prefixed_libs(prefix)
old_lib_paths = _deduplicated(old_pure, old_plat)
@@ -11,7 +11,7 @@
# rationale for why this is done within pip.
try:
__import__("_distutils_hack").remove_shim()
except ImportError:
except (ImportError, AttributeError):
pass
import logging
@@ -13,7 +13,7 @@ from pipenv.patched.pip import __version__ as current_version # NOTE: tests pat
DEPRECATION_MSG_PREFIX = "DEPRECATION: "
class PipDeprecationWarning(DeprecationWarning):
class PipDeprecationWarning(Warning):
pass