Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-urllib3 for openSUSE:Factory 
checked in at 2026-10-16 20:07:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-urllib3 (Old)
 and      /work/SRC/openSUSE:Factory/.python-urllib3.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-urllib3"

Fri Oct 16 20:07:09 2026 rev:78 rq:1385157 version:2.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-urllib3/python-urllib3.changes    
2026-10-03 20:12:19.663574278 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-urllib3.new.3698736/python-urllib3.changes   
    2026-10-16 20:07:26.971527214 +0200
@@ -1,0 +2,5 @@
+Fri Oct 16 08:49:45 UTC 2026 - Nico Krapp <[email protected]>
+
+- add gzip-tests.patch and ssl-test.patch to fix tests
+
+-------------------------------------------------------------------

New:
----
  gzip-tests.patch
  ssl-test.patch

----------(New B)----------
  New:
- add gzip-tests.patch and ssl-test.patch to fix tests
  New:
- add gzip-tests.patch and ssl-test.patch to fix tests
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-urllib3.spec ++++++
--- /var/tmp/diff_new_pack.vE1jZv/_old  2026-10-16 20:07:28.472589936 +0200
+++ /var/tmp/diff_new_pack.vE1jZv/_new  2026-10-16 20:07:28.477590145 +0200
@@ -35,6 +35,10 @@
 # https://github.com/urllib3/urllib3/issues/3334
 %define hypercorn_commit d1719f8c1570cbd8e6a3719ffdb14a4d72880abb
 Source1:        
https://github.com/urllib3/hypercorn/archive/%{hypercorn_commit}/hypercorn-%{hypercorn_commit}.tar.gz
+# PATCH-FIX-UPSTREAM gzip-tests.patch gh#urllib3/urllib3@48113e7
+Patch0:         gzip-tests.patch
+# PATCH-FIX-UPSTREAM ssl-test.patch gh#urllib3/urllib3@be5a3f3
+Patch1:         ssl-test.patch
 BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module hatch-vcs}
 BuildRequires:  %{python_module hatchling}

++++++ gzip-tests.patch ++++++
>From 48113e7a5fa3b98a61467afa6bcbb0f9b7ca7207 Mon Sep 17 00:00:00 2001
From: "Mohamed A. Ali" <[email protected]>
Date: Thu, 24 Sep 2026 15:51:13 +0100
Subject: [PATCH] Keep gzip flush from resurfacing ignored errors on newer
 Python (#5271)

---
 changelog/5268.bugfix.rst |  2 ++
 src/urllib3/response.py   |  2 ++
 test/test_response.py     | 11 +++++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 changelog/5268.bugfix.rst

diff --git a/changelog/5268.bugfix.rst b/changelog/5268.bugfix.rst
new file mode 100644
index 0000000000..285f45487a
--- /dev/null
+++ b/changelog/5268.bugfix.rst
@@ -0,0 +1,2 @@
+Prevented a suppressed :class:`GzipDecoder` decompression error caused by 
invalid
+trailing data from resurfacing during ``flush()`` on newer Python versions.
diff --git a/src/urllib3/response.py b/src/urllib3/response.py
index ec7d308330..3464cf91e3 100644
--- a/src/urllib3/response.py
+++ b/src/urllib3/response.py
@@ -205,6 +205,8 @@ def has_unconsumed_tail(self) -> bool:
         return bool(self._unconsumed_tail)
 
     def flush(self) -> bytes:
+        if self._state == GzipDecoderState.SWALLOW_DATA:
+            return b""
         return self._obj.flush()
 
 
diff --git a/test/test_response.py b/test/test_response.py
index 24118f6528..287bdc59de 100644
--- a/test/test_response.py
+++ b/test/test_response.py
@@ -30,6 +30,7 @@
     _MAX_CHUNK_LINE_LENGTH,
     BaseHTTPResponse,
     BytesQueueBuffer,
+    GzipDecoder,
     HTTPResponse,
     brotli,
 )
@@ -495,6 +496,16 @@ def test_decode_gzip_swallow_garbage(self) -> None:
 
         assert ret == b"foofoofoo"
 
+    def test_decode_gzip_swallow_garbage_does_not_flush(self) -> None:
+        decoder = GzipDecoder()
+        data = gzip.compress(b"foo") + b"garbage"
+
+        assert decoder.decompress(data) == b"foo"
+        decoder._obj = mock.Mock(flush=mock.Mock(side_effect=zlib.error))
+
+        assert decoder.flush() == b""
+        decoder._obj.flush.assert_not_called()
+
     def test_chunked_decoding_gzip_swallow_garbage(self) -> None:
         compress = zlib.compressobj(6, zlib.DEFLATED, 16 + zlib.MAX_WBITS)
         data = compress.compress(b"foo")

++++++ ssl-test.patch ++++++
>From be5a3f30aae8e0ee89759083b8ec01cfe8d60195 Mon Sep 17 00:00:00 2001
From: Rodrigo Stachlewski Palma
 <[email protected]>
Date: Fri, 2 Oct 2026 18:49:44 -0300
Subject: [PATCH] Pass server_hostname in test_start_closed_socket (#5289)

Co-authored-by: Illia Volochii <[email protected]>
---
 changelog/5289.misc.rst   | 1 +
 test/test_ssltransport.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 changelog/5289.misc.rst

diff --git a/changelog/5289.misc.rst b/changelog/5289.misc.rst
new file mode 100644
index 0000000000..51e28999e8
--- /dev/null
+++ b/changelog/5289.misc.rst
@@ -0,0 +1 @@
+Fixed SSL transport test failures on Python 3.10.22+, 3.11.17+, 3.12.15+, 
3.13.16+, and 3.14.8+.
diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py
index 7a7d8ed820..103bf8f441 100644
--- a/test/test_ssltransport.py
+++ b/test/test_ssltransport.py
@@ -136,7 +136,7 @@ def test_start_closed_socket(self) -> None:
         context = ssl.create_default_context()
         sock.close()
         with pytest.raises(OSError):
-            SSLTransport(sock, context)
+            SSLTransport(sock, context, server_hostname="localhost")
 
     @pytest.mark.timeout(PER_TEST_TIMEOUT)
     def test_close_after_handshake(self) -> None:

Reply via email to