python-pip/disable-ssl-context-in-buildenv.patch
Daniel Garcia bfc0b43bf2 - update to 25.0.1
* Fix an unsupported type annotation on Python 3.10 and earlier. 
    (#13181)
  * Fix a regression where truststore would never be used while 
    installing build dependencies. (#13186)
  * Deprecate the no-python-version-warning flag as it has long done 
    nothing since Python 2 support was removed in pip 21.0. (#13154)
  * Prefer to display PEP 639 License-Expression in pip show if
    metadata version is at least 2.4. (#13112)
  * Support PEP 639 License-Expression and License-File metadata 
    fields in JSON output. pip inspect and pip install --report now 
    emit license_expression and license_file fields in the metadata 
    object, if the corresponding fields are present in the installed 
    METADATA file. (#13134)
  * Files in the network cache will inherit the read/write permissions 
    of pip’s cache directory (in addition to the current user retaining 
    read/write access). This enables a single cache to be shared among 
    multiple users. (#11012)
  * Return the size, along with the number, of files cleared on pip 
    cache purge and pip cache remove (#12176)
  * Cache python-requires checks while filtering potential installation 
    candidates. (#13128)
  * Optimize package collection by avoiding unnecessary URL parsing and 
    other processing. (#13132)
  * Reorder the encoding detection when decoding a requirements file, 
    relying on UTF-8 over the locale encoding by default, matching the 
    documented behaviour. (#12771)
  * The pip version self check is disabled on EXTERNALLY-MANAGED 
    environments. (#11820)
  * Fix a security bug allowing a specially crafted wheel to execute

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=140
2025-04-21 06:25:31 +00:00

31 lines
1.2 KiB
Diff

Index: pip-24.2/src/pip/_vendor/requests/adapters.py
===================================================================
--- pip-24.2.orig/src/pip/_vendor/requests/adapters.py
+++ pip-24.2/src/pip/_vendor/requests/adapters.py
@@ -81,7 +81,7 @@ try:
_preloaded_ssl_context.load_verify_locations(
extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
)
-except ImportError:
+except (ImportError, FileNotFoundError, ssl.SSLError):
# 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, ssl.SSLError):
+ logger.warning("Disabling truststore because of missing certificates")
+ return None
return ctx