From 188c4218466a89a660e312d5ea470bc7190448bc270547c51c57f4600b2a045e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 12 Aug 2024 20:12:13 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=130 --- disable-ssl-context-in-buildenv.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/disable-ssl-context-in-buildenv.patch b/disable-ssl-context-in-buildenv.patch index c5a950c..918c0bc 100644 --- a/disable-ssl-context-in-buildenv.patch +++ b/disable-ssl-context-in-buildenv.patch @@ -11,3 +11,20 @@ Index: pip-24.2/src/pip/_vendor/requests/adapters.py # Bypass default SSLContext creation when Python # interpreter isn't built with the ssl module. _preloaded_ssl_context = None +Index: pip-24.2/src/pip/_internal/cli/index_command.py +=================================================================== +--- pip-24.2.orig/src/pip/_internal/cli/index_command.py ++++ pip-24.2/src/pip/_internal/cli/index_command.py +@@ -43,7 +43,11 @@ def _create_truststore_ssl_context() -> + return None + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) +- ctx.load_verify_locations(certifi.where()) ++ try: ++ ctx.load_verify_locations(certifi.where()) ++ except FileNotFoundError: ++ logger.warning("Disabling truststore because of missing certificates") ++ return None + return ctx + +