Skip to content
Snippets Groups Projects
Commit 703be3c9 authored by Stefano Rivera's avatar Stefano Rivera
Browse files

Refresh patches.

parent 6e7007c1
No related branches found
No related tags found
No related merge requests found
python-pip (22.3+dfsg-1) UNRELEASED; urgency=medium
* New upstream release.
* Refresh patches.
* Drop unnecessary Build-Depends on python3-wheel.
* Use execute_{before,after} instead of overrides, where possible, in
debian/rules.
......
......@@ -5,43 +5,32 @@ Subject: Use Debian provided /etc/ssl/certs/ca-certificates.cr
Origin: https://salsa.debian.org/debian/python-certifi/-/blob/debian/master/debian/patches/0001-Use-Debian-provided-etc-ssl-certs-ca-certificates.cr.patch
Forwarded: not-necessary
---
src/pip/_vendor/certifi/core.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
src/pip/_vendor/certifi/core.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py
index f34045b..9a4034e 100644
index c3e5466..5c67600 100644
--- a/src/pip/_vendor/certifi/core.py
+++ b/src/pip/_vendor/certifi/core.py
@@ -13,6 +13,8 @@ class _PipPatchedCertificate(Exception):
pass
@@ -6,6 +6,7 @@ This module returns the installation location of cacert.pem or its contents.
"""
import sys
+DEBIAN_CA_CERTS_PATH = '/etc/ssl/certs/ca-certificates.crt'
+
try:
# Return a certificate file on disk for a standalone pip zipapp running in
# an isolated build environment to use. Passing --cert to the standalone
@@ -47,8 +49,7 @@ try:
# We also have to hold onto the actual context manager, because
# it will do the cleanup whenever it gets garbage collected, so
# we will also store that at the global level as well.
- _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem")
- _CACERT_PATH = str(_CACERT_CTX.__enter__())
+ _CACERT_PATH = DEBIAN_CA_CERTS_PATH
return _CACERT_PATH
if sys.version_info >= (3, 11):
@@ -75,10 +76,9 @@ except ImportError:
# If we don't have importlib.resources, then we will just do the old logic
# of assuming we're on the filesystem and munge the path directly.
def where() -> str:
- f = os.path.dirname(__file__)
-
- return os.path.join(f, "cacert.pem")
+ return DEBIAN_CA_CERTS_PATH
@@ -106,3 +107,13 @@ else:
def contents() -> str:
- return read_text("certifi", "cacert.pem", encoding="ascii")
def contents() -> str:
return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii")
+
+
+# Debian: Use system CA certs:
+def where() -> str:
+ return DEBIAN_CA_CERTS_PATH
+
+
+def contents() -> str:
+ with open(where(), "r", encoding="ascii") as data:
+ return data.read()
......@@ -15,7 +15,7 @@ Last-Update: 2020-04-01
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/pip/_internal/commands/list.py b/src/pip/_internal/commands/list.py
index a9b08a0..29126fd 100644
index 8e1426d..ba6459c 100644
--- a/src/pip/_internal/commands/list.py
+++ b/src/pip/_internal/commands/list.py
@@ -33,6 +33,8 @@ if TYPE_CHECKING:
......@@ -27,7 +27,7 @@ index a9b08a0..29126fd 100644
logger = logging.getLogger(__name__)
@@ -193,7 +195,7 @@ class ListCommand(IndexGroupCommand):
@@ -198,7 +200,7 @@ class ListCommand(IndexGroupCommand):
return [
dist
for dist in self.iter_packages_latest_infos(packages, options)
......@@ -36,7 +36,7 @@ index a9b08a0..29126fd 100644
]
def get_uptodate(
@@ -202,7 +204,7 @@ class ListCommand(IndexGroupCommand):
@@ -207,7 +209,7 @@ class ListCommand(IndexGroupCommand):
return [
dist
for dist in self.iter_packages_latest_infos(packages, options)
......
......@@ -8,10 +8,10 @@ Patch-Name: disable-pip-version-check.patch
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.py
index 47ed927..960e454 100644
index b4e2560..d26009c 100644
--- a/src/pip/_internal/cli/cmdoptions.py
+++ b/src/pip/_internal/cli/cmdoptions.py
@@ -891,7 +891,7 @@ disable_pip_version_check: Callable[..., Option] = partial(
@@ -873,7 +873,7 @@ disable_pip_version_check: Callable[..., Option] = partial(
"--disable-pip-version-check",
dest="disable_pip_version_check",
action="store_true",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment