Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-responses for 
openSUSE:Factory checked in at 2026-07-07 20:59:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-responses (Old)
 and      /work/SRC/openSUSE:Factory/.python-responses.new.1982 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-responses"

Tue Jul  7 20:59:50 2026 rev:38 rq:1363850 version:0.26.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-responses/python-responses.changes        
2026-05-28 23:08:00.225688984 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-responses.new.1982/python-responses.changes  
    2026-07-07 21:00:08.455982845 +0200
@@ -1,0 +2,12 @@
+Sun Jul  5 10:42:22 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.26.2:
+  * Default headers (such as ``Content-Type``, ``Date`` and
+    ``Server``) are now stripped from recorded files regardless
+    of header name case.  Previously, responses recorded from
+    servers that send lowercase header names (for example over
+    HTTP/2) kept these redundant headers in the generated file.
+  * Fixed `query_param_matcher` mutating the caller's params dict
+    when numeric values are provided. See #801
+
+-------------------------------------------------------------------

Old:
----
  responses-0.26.1.tar.gz

New:
----
  responses-0.26.2.tar.gz

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

Other differences:
------------------
++++++ python-responses.spec ++++++
--- /var/tmp/diff_new_pack.9ilRwn/_old  2026-07-07 21:00:09.652023271 +0200
+++ /var/tmp/diff_new_pack.9ilRwn/_new  2026-07-07 21:00:09.652023271 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-responses
-Version:        0.26.1
+Version:        0.26.2
 Release:        0
 Summary:        A utility library for mocking out the `requests` Python library
 License:        Apache-2.0

++++++ responses-0.26.1.tar.gz -> responses-0.26.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/CHANGES new/responses-0.26.2/CHANGES
--- old/responses-0.26.1/CHANGES        2026-05-21 21:54:07.000000000 +0200
+++ new/responses-0.26.2/CHANGES        2026-07-03 18:42:35.000000000 +0200
@@ -1,3 +1,13 @@
+0.26.2
+------
+
+* Default headers (such as ``Content-Type``, ``Date`` and ``Server``) are now 
stripped
+  from recorded files regardless of header name case. Previously, responses 
recorded from
+  servers that send lowercase header names (for example over HTTP/2) kept 
these redundant
+  headers in the generated file.
+* Fixed `query_param_matcher` mutating the caller's params dict when numeric
+  values are provided. See #801
+
 0.26.1
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/PKG-INFO 
new/responses-0.26.2/PKG-INFO
--- old/responses-0.26.1/PKG-INFO       2026-05-21 21:54:17.008405000 +0200
+++ new/responses-0.26.2/PKG-INFO       2026-07-03 18:42:43.970410800 +0200
@@ -1,10 +1,10 @@
 Metadata-Version: 2.4
 Name: responses
-Version: 0.26.1
+Version: 0.26.2
 Summary: A utility library for mocking out the `requests` Python library.
 Home-page: https://github.com/getsentry/responses
 Author: David Cramer
-License: Apache 2.0
+License: Apache-2.0
 Project-URL: Bug Tracker, https://github.com/getsentry/responses/issues
 Project-URL: Changes, 
https://github.com/getsentry/responses/blob/master/CHANGES
 Project-URL: Documentation, 
https://github.com/getsentry/responses/blob/master/README.rst
@@ -1455,7 +1455,7 @@
         status: 202
         url: https://httpstat.us/202
 
-If you are in the REPL, you can also activete the recorder for all following 
responses:
+If you are in the REPL, you can also activate the recorder for all following 
responses:
 
 .. code-block:: python
 
@@ -1554,7 +1554,7 @@
 
 .. code-block:: shell
 
-    tox -e py37
+    tox -e py38
     tox -e py310
 
 OR manually activate required version of Python and run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/README.rst 
new/responses-0.26.2/README.rst
--- old/responses-0.26.1/README.rst     2026-05-21 21:54:07.000000000 +0200
+++ new/responses-0.26.2/README.rst     2026-07-03 18:42:35.000000000 +0200
@@ -1401,7 +1401,7 @@
         status: 202
         url: https://httpstat.us/202
 
-If you are in the REPL, you can also activete the recorder for all following 
responses:
+If you are in the REPL, you can also activate the recorder for all following 
responses:
 
 .. code-block:: python
 
@@ -1500,7 +1500,7 @@
 
 .. code-block:: shell
 
-    tox -e py37
+    tox -e py38
     tox -e py310
 
 OR manually activate required version of Python and run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/responses/_recorder.py 
new/responses-0.26.2/responses/_recorder.py
--- old/responses-0.26.1/responses/_recorder.py 2026-05-21 21:54:07.000000000 
+0200
+++ new/responses-0.26.2/responses/_recorder.py 2026-07-03 18:42:35.000000000 
+0200
@@ -52,11 +52,15 @@
             "Connection",
             "Content-Encoding",
         ]
+        # HTTP header names are case-insensitive, and HTTP/2 servers send them
+        # lowercase, so match without regard to case.
+        keys_to_remove_lower = {key.lower() for key in keys_to_remove}
         for i, response in enumerate(data["responses"]):
-            for key in keys_to_remove:
-                if key in response["response"]["headers"]:
-                    del data["responses"][i]["response"]["headers"][key]
-            if not response["response"]["headers"]:
+            headers = data["responses"][i]["response"]["headers"]
+            for key in list(headers):
+                if key.lower() in keys_to_remove_lower:
+                    del headers[key]
+            if not headers:
                 del data["responses"][i]["response"]["headers"]
     return data
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/responses/matchers.py 
new/responses-0.26.2/responses/matchers.py
--- old/responses-0.26.1/responses/matchers.py  2026-05-21 21:54:07.000000000 
+0200
+++ new/responses-0.26.2/responses/matchers.py  2026-07-03 18:42:35.000000000 
+0200
@@ -215,7 +215,7 @@
 
     """
 
-    params_dict = params or {}
+    params_dict = dict(params) if params else {}
 
     for k, v in params_dict.items():
         if isinstance(v, (int, float)):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/responses/tests/test_matchers.py 
new/responses-0.26.2/responses/tests/test_matchers.py
--- old/responses-0.26.1/responses/tests/test_matchers.py       2026-05-21 
21:54:07.000000000 +0200
+++ new/responses-0.26.2/responses/tests/test_matchers.py       2026-07-03 
18:42:35.000000000 +0200
@@ -371,6 +371,24 @@
     assert_reset()
 
 
+def test_query_param_matcher_does_not_mutate_input():
+    """query_param_matcher must not modify the caller's params dict.
+
+    Numeric values (int/float) are converted to strings internally for
+    comparison, but the conversion must not happen on the original dict.
+    """
+    params = {"page": 1, "ratio": 0.5, "name": "test"}
+    original_types = {k: type(v) for k, v in params.items()}
+
+    matchers.query_param_matcher(params)
+
+    for k, expected_type in original_types.items():
+        assert type(params[k]) is expected_type, (
+            f"query_param_matcher mutated params[{k!r}]: "
+            f"expected {expected_type.__name__}, got 
{type(params[k]).__name__}"
+        )
+
+
 def test_query_param_matcher_empty_value():
     @responses.activate
     def run():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/responses/tests/test_recorder.py 
new/responses-0.26.2/responses/tests/test_recorder.py
--- old/responses-0.26.1/responses/tests/test_recorder.py       2026-05-21 
21:54:07.000000000 +0200
+++ new/responses-0.26.2/responses/tests/test_recorder.py       2026-07-03 
18:42:35.000000000 +0200
@@ -8,6 +8,7 @@
 import responses
 from responses import _recorder
 from responses._recorder import _dump
+from responses._recorder import _remove_default_headers
 
 try:
     import tomli as _toml
@@ -67,6 +68,44 @@
     return data
 
 
+def test_remove_default_headers_is_case_insensitive():
+    """Default headers should be stripped regardless of their case.
+
+    HTTP/2 servers send header names in lowercase, so the recorded file may
+    contain e.g. ``content-type`` / ``date`` rather than ``Content-Type`` /
+    ``Date``. These still need to be removed, otherwise the recorded file
+    keeps verbose default headers (and, for content-type, a value that is
+    already stored in the ``content_type`` field).
+    """
+    data = {
+        "responses": [
+            {
+                "response": {
+                    # mixed lower/title/upper case to pin the case-insensitive 
contract
+                    "headers": {
+                        "content-type": "application/json",
+                        "Date": "Mon, 01 Jan 2024 00:00:00 GMT",
+                        "SERVER": "nginx",
+                        "x-custom": "keep-me",
+                    }
+                }
+            },
+            {
+                # a response whose headers are all default ones is left 
without a
+                # "headers" key at all
+                "response": {
+                    "headers": {"content-length": "12", "connection": 
"keep-alive"}
+                }
+            },
+        ]
+    }
+
+    result = _remove_default_headers(data)
+
+    assert result["responses"][0]["response"]["headers"] == {"x-custom": 
"keep-me"}
+    assert "headers" not in result["responses"][1]["response"]
+
+
 class TestRecord:
     def setup_method(self):
         self.out_file = Path("response_record")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/responses.egg-info/PKG-INFO 
new/responses-0.26.2/responses.egg-info/PKG-INFO
--- old/responses-0.26.1/responses.egg-info/PKG-INFO    2026-05-21 
21:54:16.000000000 +0200
+++ new/responses-0.26.2/responses.egg-info/PKG-INFO    2026-07-03 
18:42:43.000000000 +0200
@@ -1,10 +1,10 @@
 Metadata-Version: 2.4
 Name: responses
-Version: 0.26.1
+Version: 0.26.2
 Summary: A utility library for mocking out the `requests` Python library.
 Home-page: https://github.com/getsentry/responses
 Author: David Cramer
-License: Apache 2.0
+License: Apache-2.0
 Project-URL: Bug Tracker, https://github.com/getsentry/responses/issues
 Project-URL: Changes, 
https://github.com/getsentry/responses/blob/master/CHANGES
 Project-URL: Documentation, 
https://github.com/getsentry/responses/blob/master/README.rst
@@ -1455,7 +1455,7 @@
         status: 202
         url: https://httpstat.us/202
 
-If you are in the REPL, you can also activete the recorder for all following 
responses:
+If you are in the REPL, you can also activate the recorder for all following 
responses:
 
 .. code-block:: python
 
@@ -1554,7 +1554,7 @@
 
 .. code-block:: shell
 
-    tox -e py37
+    tox -e py38
     tox -e py310
 
 OR manually activate required version of Python and run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/responses-0.26.1/setup.py 
new/responses-0.26.2/setup.py
--- old/responses-0.26.1/setup.py       2026-05-21 21:54:07.000000000 +0200
+++ new/responses-0.26.2/setup.py       2026-07-03 18:42:35.000000000 +0200
@@ -36,7 +36,7 @@
 
 setup(
     name="responses",
-    version="0.26.1",
+    version="0.26.2",
     author="David Cramer",
     description="A utility library for mocking out the `requests` Python 
library.",
     url="https://github.com/getsentry/responses";,
@@ -46,7 +46,7 @@
         "Documentation": 
"https://github.com/getsentry/responses/blob/master/README.rst";,
         "Source Code": "https://github.com/getsentry/responses";,
     },
-    license="Apache 2.0",
+    license="Apache-2.0",
     long_description=open("README.rst", encoding="utf-8").read(),
     long_description_content_type="text/x-rst",
     packages=["responses"],

Reply via email to