Update the patches

This commit is contained in:
Petr Viktorin 2020-12-02 16:46:34 +01:00
parent 58c5acd7e8
commit 0626df487e
3 changed files with 19 additions and 17 deletions

View File

@ -26,7 +26,7 @@ index befd01c..d6f3632 100644
--- a/src/pip/_internal/utils/entrypoints.py
+++ b/src/pip/_internal/utils/entrypoints.py
@@ -7,7 +7,7 @@ if MYPY_CHECK_RUNNING:
from typing import Optional, List
from typing import List, Optional
-def _wrapper(args=None):

View File

@ -70,13 +70,14 @@ BuildRequires: python-wheel-wheel
# Downstream only patch
# Emit a warning to the user if pip install is run with root privileges
# Issue upstream: https://github.com/pypa/pip/issues/4288
# Upstream discussion:
# https://discuss.python.org/t/playing-nice-with-external-package-managers/1968/20
Patch1: emit-a-warning-when-running-with-root-privileges.patch
# Prevent removing of the system packages installed under /usr/lib
# when pip install -U is executed.
# https://bugzilla.redhat.com/show_bug.cgi?id=1550368#c24
#Patch3: remove-existing-dist-only-if-path-conflicts.patch
Patch3: remove-existing-dist-only-if-path-conflicts.patch
# Use the system level root certificate instead of the one bundled in certifi
# https://bugzilla.redhat.com/show_bug.cgi?id=1655253
@ -85,7 +86,7 @@ Patch4: dummy-certifi.patch
# Don't warn the user about pip._internal.main() entrypoint
# In Fedora, we use that in ensurepip and users cannot do anything about it,
# this warning is juts moot. Also, the warning breaks CPython test suite.
#Patch5: nowarn-pip._internal.main.patch
Patch5: nowarn-pip._internal.main.patch
# Downstream only patch
# Users might have local installations of pip from using

View File

@ -20,7 +20,7 @@ diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_in
index 4759f4a..2e76e35 100644
--- a/src/pip/_internal/req/req_install.py
+++ b/src/pip/_internal/req/req_install.py
@@ -39,6 +39,7 @@ from pip._internal.utils.misc import (
@@ -41,6 +41,7 @@ from pip._internal.utils.misc import (
ask_path_exists,
backup_dir,
display_path,
@ -28,7 +28,7 @@ index 4759f4a..2e76e35 100644
dist_in_site_packages,
dist_in_usersite,
get_distribution,
@@ -446,7 +447,7 @@ class InstallRequirement(object):
@@ -447,7 +448,7 @@ class InstallRequirement(object):
"lack sys.path precedence to {} in {}".format(
existing_dist.project_name, existing_dist.location)
)
@ -46,10 +46,10 @@ index c9b4c66..ff361d8 100644
from pip._internal.utils.logging import indent_log
from pip._internal.utils.misc import dist_in_usersite, normalize_version_info
+from pip._internal.utils.misc import dist_in_install_path
from pip._internal.utils.packaging import (
check_requires_python,
get_requires_python,
@@ -207,7 +208,9 @@ class Resolver(BaseResolver):
from pip._internal.utils.packaging import check_requires_python, get_requires_python
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
@@ -204,7 +205,9 @@ class Resolver(BaseResolver):
"""
# Don't uninstall the conflict if doing a user install and the
# conflict is not a user install.
@ -64,15 +64,16 @@ diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py
index 24a7455..5fd48d3 100644
--- a/src/pip/_internal/utils/misc.py
+++ b/src/pip/_internal/utils/misc.py
@@ -31,6 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
@@ -31,7 +31,7 @@ from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
from pip import __version__
from pip._internal.exceptions import CommandError
from pip._internal.locations import (
+ distutils_scheme,
get_major_minor_version,
site_packages,
user_site,
@@ -403,6 +404,16 @@ def dist_in_site_packages(dist):
-from pip._internal.locations import get_major_minor_version, site_packages, user_site
+from pip._internal.locations import distutils_scheme, get_major_minor_version, site_packages, user_site
from pip._internal.utils.compat import WINDOWS, expanduser, stdlib_pkgs, str_to_display
from pip._internal.utils.typing import MYPY_CHECK_RUNNING, cast
from pip._internal.utils.virtualenv import (
@@ -406,6 +406,16 @@ def dist_in_site_packages(dist):
return dist_location(dist).startswith(normalize_path(site_packages))