From 2085567ac464d22da42c9e772aa1080d99a6d7ec Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 28 Apr 2023 23:30:13 -0400 Subject: [PATCH 1/3] stage upgrade to pip --- pipenv/patched/patched.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/patched/patched.txt b/pipenv/patched/patched.txt index fbd27f9f92..ab90974f8b 100644 --- a/pipenv/patched/patched.txt +++ b/pipenv/patched/patched.txt @@ -1,2 +1,2 @@ -pip==23.1 +pip==23.1.2 safety==2.3.2 From 99ee1f8a236d9919dcc4e0fb9cbd0863111f1537 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 28 Apr 2023 23:33:50 -0400 Subject: [PATCH 2/3] Update pip to 23.1.2 --- pipenv/patched/pip/__init__.py | 2 +- pipenv/patched/pip/_internal/cli/main.py | 9 +++++++++ pipenv/patched/pip/_internal/configuration.py | 18 +++--------------- .../pip/_vendor/pkg_resources/__init__.py | 3 +++ pipenv/patched/pip/_vendor/vendor.txt | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pipenv/patched/pip/__init__.py b/pipenv/patched/pip/__init__.py index 25739b53a0..f6358f08e1 100644 --- a/pipenv/patched/pip/__init__.py +++ b/pipenv/patched/pip/__init__.py @@ -1,6 +1,6 @@ from typing import List, Optional -__version__ = "23.1" +__version__ = "23.1.2" def main(args: Optional[List[str]] = None) -> int: diff --git a/pipenv/patched/pip/_internal/cli/main.py b/pipenv/patched/pip/_internal/cli/main.py index ee3cf1e0af..d9f5a55d9f 100644 --- a/pipenv/patched/pip/_internal/cli/main.py +++ b/pipenv/patched/pip/_internal/cli/main.py @@ -4,6 +4,7 @@ import logging import os import sys +import warnings from typing import List, Optional from pipenv.patched.pip._internal.cli.autocompletion import autocomplete @@ -46,6 +47,14 @@ def main(args: Optional[List[str]] = None) -> int: if args is None: args = sys.argv[1:] + # Suppress the pkg_resources deprecation warning + # Note - we use a module of .*pkg_resources to cover + # the normal case (pipenv.patched.pip._vendor.pkg_resources) and the + # devendored case (a bare pkg_resources) + warnings.filterwarnings( + action="ignore", category=DeprecationWarning, module=".*pkg_resources" + ) + # Configure our deprecation warnings to be sent through loggers deprecation.install_warning_logger() diff --git a/pipenv/patched/pip/_internal/configuration.py b/pipenv/patched/pip/_internal/configuration.py index 7c596302d6..fdb3f87bb8 100644 --- a/pipenv/patched/pip/_internal/configuration.py +++ b/pipenv/patched/pip/_internal/configuration.py @@ -36,20 +36,12 @@ kinds = enum( USER="user", # User Specific GLOBAL="global", # System Wide - BASE="base", # Base environment specific (e.g. for all venvs with the same base) - SITE="site", # Environment Specific (e.g. per venv) + SITE="site", # [Virtual] Environment Specific ENV="env", # from PIP_CONFIG_FILE ENV_VAR="env-var", # from Environment Variables ) -OVERRIDE_ORDER = ( - kinds.GLOBAL, - kinds.USER, - kinds.BASE, - kinds.SITE, - kinds.ENV, - kinds.ENV_VAR, -) -VALID_LOAD_ONLY = kinds.USER, kinds.GLOBAL, kinds.BASE, kinds.SITE +OVERRIDE_ORDER = kinds.GLOBAL, kinds.USER, kinds.SITE, kinds.ENV, kinds.ENV_VAR +VALID_LOAD_ONLY = kinds.USER, kinds.GLOBAL, kinds.SITE logger = getLogger(__name__) @@ -78,7 +70,6 @@ def get_configuration_files() -> Dict[Kind, List[str]]: os.path.join(path, CONFIG_BASENAME) for path in appdirs.site_config_dirs("pip") ] - base_config_file = os.path.join(sys.base_prefix, CONFIG_BASENAME) site_config_file = os.path.join(sys.prefix, CONFIG_BASENAME) legacy_config_file = os.path.join( os.path.expanduser("~"), @@ -87,7 +78,6 @@ def get_configuration_files() -> Dict[Kind, List[str]]: ) new_config_file = os.path.join(appdirs.user_config_dir("pip"), CONFIG_BASENAME) return { - kinds.BASE: [base_config_file], kinds.GLOBAL: global_config_files, kinds.SITE: [site_config_file], kinds.USER: [legacy_config_file, new_config_file], @@ -354,8 +344,6 @@ def iter_config_files(self) -> Iterable[Tuple[Kind, List[str]]]: # The legacy config file is overridden by the new config file yield kinds.USER, config_files[kinds.USER] - yield kinds.BASE, config_files[kinds.BASE] - # finally virtualenv configuration first trumping others yield kinds.SITE, config_files[kinds.SITE] diff --git a/pipenv/patched/pip/_vendor/pkg_resources/__init__.py b/pipenv/patched/pip/_vendor/pkg_resources/__init__.py index 7104bd168c..f8e9b31545 100644 --- a/pipenv/patched/pip/_vendor/pkg_resources/__init__.py +++ b/pipenv/patched/pip/_vendor/pkg_resources/__init__.py @@ -3046,6 +3046,9 @@ def has_version(self): except ValueError: issue_warning("Unbuilt egg for " + repr(self)) return False + except SystemError: + # TODO: remove this except clause when python/cpython#103632 is fixed. + return False return True def clone(self, **kw): diff --git a/pipenv/patched/pip/_vendor/vendor.txt b/pipenv/patched/pip/_vendor/vendor.txt index 3974df3f11..61063459d6 100644 --- a/pipenv/patched/pip/_vendor/vendor.txt +++ b/pipenv/patched/pip/_vendor/vendor.txt @@ -16,7 +16,7 @@ rich==13.3.3 pygments==2.14.0 typing_extensions==4.5.0 resolvelib==1.0.1 -setuptools==67.6.1 +setuptools==67.7.2 six==1.16.0 tenacity==8.2.2 tomli==2.0.1 From afa6bce347990315eb39276fbedc9b03b96818a5 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Fri, 28 Apr 2023 23:35:39 -0400 Subject: [PATCH 3/3] Vendor in latest pip 23.1.2 --- news/5671.vendor.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/5671.vendor.rst diff --git a/news/5671.vendor.rst b/news/5671.vendor.rst new file mode 100644 index 0000000000..20fc4879d0 --- /dev/null +++ b/news/5671.vendor.rst @@ -0,0 +1 @@ +Vendor in ``pip==23.1.2`` latest.