Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-httpretty for 
openSUSE:Factory checked in at 2025-05-31 19:14:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-httpretty (Old)
 and      /work/SRC/openSUSE:Factory/.python-httpretty.new.16005 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-httpretty"

Sat May 31 19:14:22 2025 rev:31 rq:1280753 version:1.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-httpretty/python-httpretty.changes        
2025-01-23 17:56:57.559198105 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-httpretty.new.16005/python-httpretty.changes 
    2025-05-31 19:14:23.500620809 +0200
@@ -1,0 +2,6 @@
+Wed May 28 06:01:26 UTC 2025 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add 0001-Mock-socket.shutdown-for-compatibility-with-urllib3-.patch:
+  * Mock socket.shutdown for compatibility with urllib3 >= 2.3
+
+-------------------------------------------------------------------

New:
----
  0001-Mock-socket.shutdown-for-compatibility-with-urllib3-.patch

BETA DEBUG BEGIN:
  New:
- Add 0001-Mock-socket.shutdown-for-compatibility-with-urllib3-.patch:
  * Mock socket.shutdown for compatibility with urllib3 >= 2.3
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-httpretty.spec ++++++
--- /var/tmp/diff_new_pack.CrHFOh/_old  2025-05-31 19:14:24.492661807 +0200
+++ /var/tmp/diff_new_pack.CrHFOh/_new  2025-05-31 19:14:24.492661807 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-httpretty
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -42,6 +42,8 @@
 Patch4:         relax-test-callback-response.patch
 # PATCH-FIX-UPSTREAM https://github.com/gabrielfalcao/HTTPretty/pull/480
 Patch5:         0001-Fix-test_417_openssl.py-if-pyOpenSSL-not-available.patch
+# PATCH-FIX-UPSTREAM https://github.com/gabrielfalcao/HTTPretty/pull/485
+Patch6:         0001-Mock-socket.shutdown-for-compatibility-with-urllib3-.patch
 %if %{with boto3}
 BuildRequires:  %{python_module boto3}
 %endif

++++++ 0001-Mock-socket.shutdown-for-compatibility-with-urllib3-.patch ++++++
>From 8e96b1e312d473429fbd08bc867376e9932ad42a Mon Sep 17 00:00:00 2001
From: Carl Smedstad <carl.smeds...@protonmail.com>
Date: Mon, 30 Dec 2024 19:08:26 +0100
Subject: [PATCH] Mock socket.shutdown for compatibility with urllib3 >= 2.3

Version 2.3.0 of urllib3 gets the attribute socket.shutdown which
HTTPretty does no mock. See the following call stack:

    /usr/lib/python3.13/site-packages/requests/sessions.py:602: in get
        return self.request("GET", url, **kwargs)
    /usr/lib/python3.13/site-packages/requests/sessions.py:589: in request
        resp = self.send(prep, **send_kwargs)
    /usr/lib/python3.13/site-packages/requests/sessions.py:703: in send
        r = adapter.send(request, **kwargs)
    /usr/lib/python3.13/site-packages/requests/adapters.py:667: in send
        resp = conn.urlopen(
    /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:787: in urlopen
        response = self._make_request(
    /usr/lib/python3.13/site-packages/urllib3/connectionpool.py:534: in 
_make_request
        response = conn.getresponse()
    /usr/lib/python3.13/site-packages/urllib3/connection.py:513: in getresponse
        _shutdown = getattr(self.sock, "shutdown", None)
---
 httpretty/core.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/httpretty/core.py b/httpretty/core.py
index 6968645..de7e091 100644
--- a/httpretty/core.py
+++ b/httpretty/core.py
@@ -861,6 +861,9 @@ class fakesock(object):
         def recvfrom(self, *args, **kwargs):
             return self.forward_and_trace('recvfrom', *args, **kwargs)
 
+        def shutdown(self, *args, **kwargs):
+            return self.forward_and_trace('shutdown', *args, **kwargs)
+
         def recv(self, buffersize=0, *args, **kwargs):
             if not self._read_buf:
                 self._read_buf = io.BytesIO()
-- 
2.49.0

Reply via email to