Sync from SUSE:SLFO:Main python-urllib3_1 revision 30ffe62e978deab14e32535e11f6f13f

This commit is contained in:
Adrian Schröter 2024-12-13 12:34:43 +01:00
parent c657c76557
commit c7e9b97dca
5 changed files with 20 additions and 42 deletions

View File

@ -1,34 +0,0 @@
Index: urllib3-1.26.18/changelog/3268.bugfix.rst
===================================================================
--- /dev/null
+++ urllib3-1.26.18/changelog/3268.bugfix.rst
@@ -0,0 +1 @@
+Fixed handling of OpenSSL 3.2.0 new error message for misconfiguring an HTTP proxy as HTTPS.
Index: urllib3-1.26.18/test/with_dummyserver/test_socketlevel.py
===================================================================
--- urllib3-1.26.18.orig/test/with_dummyserver/test_socketlevel.py
+++ urllib3-1.26.18/test/with_dummyserver/test_socketlevel.py
@@ -1226,7 +1226,8 @@ class TestSSL(SocketDummyServerTestCase)
self._start_server(socket_handler)
with HTTPSConnectionPool(self.host, self.port, ca_certs=DEFAULT_CA) as pool:
with pytest.raises(
- SSLError, match=r"(wrong version number|record overflow)"
+ SSLError,
+ match=r"(wrong version number|record overflow|record layer failure)",
):
pool.request("GET", "/", retries=False)
Index: urllib3-1.26.18/src/urllib3/connectionpool.py
===================================================================
--- urllib3-1.26.18.orig/src/urllib3/connectionpool.py
+++ urllib3-1.26.18/src/urllib3/connectionpool.py
@@ -768,7 +768,8 @@ class HTTPConnectionPool(ConnectionPool,
# so we try to cover our bases here!
message = " ".join(re.split("[^a-z]", str(ssl_error).lower()))
return (
- "wrong version number" in message or "unknown protocol" in message
+ "wrong version number" in message or "unknown protocol" in message or "record layer failure" in message
+
)
# Try to detect a common user error with proxies which is to

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Sep 10 06:30:59 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.26.20:
* Fixed a crash where certain standard library hash functions were absent
in FIPS-compliant environments.
* Replaced deprecated dash-separated setuptools entries in setup.cfg.
* Backported changes to our tests and CI configuration from v2.x to
support testing with CPython 3.12 and 3.13.
* Added the Proxy-Authorization header to the list of headers to strip
from requests when redirecting to a different host. As before, different
headers can be set via Retry.remove_headers_on_redirect.
- Drop patch openssl-3.2.patch:
* No longer required.
-------------------------------------------------------------------
Thu Jan 11 12:03:28 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package python-urllib3_1
#
# Copyright (c) 2024 SUSE LLC
#
@ -26,18 +26,15 @@
%endif
%{?sle15_python_module_pythons}
Name: python-urllib3_1%{psuffix}
Version: 1.26.18
Version: 1.26.20
Release: 0
Summary: HTTP library with thread-safe connection pooling, file post, and more
License: MIT
Group: Development/Languages/Python
URL: https://urllib3.readthedocs.org/
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com
# remove dependency on the external module mock
Patch0: remove_mock.patch
# PATCH-FIX-UPSTREAM openssl-3.2.patch gh#urllib3/urllib3#3271
Patch1: openssl-3.2.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}

BIN
urllib3-1.26.18.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
urllib3-1.26.20.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.