14
0
forked from pool/python-pip
Files
python-pip/disable-ssl-context-in-buildenv.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

- update to 25.2 # 25.1 * Drop support for Python 3.8. * On python 3.14+, the pkg_resources metadata backend cannot be used anymore. * Hide --no-python-version-warning from CLI help and documentation as it's useless since Python 2 support was removed. * A warning is emitted when the deprecated pkg_resources library is used to inspect and discover installed packages. * Deprecate the legacy setup.py bdist_wheel mechanism. To silence the warning, and future-proof their setup, users should enable --use-pep517 or add a pyproject.toml file to the projects they control. * Using --debug also enables verbose logging. * Display a transient progress bar during package installation. * Add a --group option which allows installation from PEP 735 Dependency Groups. * Use PEP 753 "Well-known Project URLs in Metadata" normalization rules when identifying an equivalent project URL to replace a missing Home-Page field in pip show. * Add a new, experimental, pip lock command, implementing PEP 751. * Resolvelib 1.1.0 fixes a known issue where pip would report a ResolutionImpossible error even though there is a valid solution. However, some very complex dependency resolutions that previously resolved may resolve slower or fail with an ResolutionTooDeep error. # 25.2 * Declare support for Python 3.14 * Automatic download resumption and retrying is enabled by default. * Requires-Python error message displays version clauses in numerical order. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip?expand=0&rev=142
2025-08-13 15:30:17 +00:00
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