Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendoring in pip 22.2.2 #5230

Merged
merged 3 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/5230.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Vendor in minor ``pip`` update ``22.2.2``
2 changes: 1 addition & 1 deletion pipenv/patched/patched.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip==22.2.1
pip==22.2.2
pipfile==0.0.2
safety==1.10.3
2 changes: 1 addition & 1 deletion pipenv/patched/pip/__init__.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 0 additions & 1 deletion pipenv/patched/pip/__pip-runner__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def find_spec(
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"
Expand Down
1 change: 1 addition & 0 deletions pipenv/patched/pip/_internal/index/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 6 additions & 8 deletions pipenv/patched/pip/_internal/locations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -241,8 +247,6 @@ def get_scheme(
if _USE_SYSCONFIG:
return new

from . import _distutils

old = _distutils.get_scheme(
dist_name,
user=user,
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pipenv/patched/pip/_internal/locations/_distutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pipenv/patched/pip/_internal/utils/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
DEPRECATION_MSG_PREFIX = "DEPRECATION: "


class PipDeprecationWarning(DeprecationWarning):
class PipDeprecationWarning(Warning):
pass


Expand Down