Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-vcrpy for openSUSE:Factory 
checked in at 2026-06-04 18:55:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-vcrpy (Old)
 and      /work/SRC/openSUSE:Factory/.python-vcrpy.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-vcrpy"

Thu Jun  4 18:55:41 2026 rev:22 rq:1357056 version:8.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-vcrpy/python-vcrpy.changes        
2026-01-23 17:33:52.387927687 +0100
+++ /work/SRC/openSUSE:Factory/.python-vcrpy.new.2375/python-vcrpy.changes      
2026-06-04 18:57:40.753207751 +0200
@@ -1,0 +2,6 @@
+Thu Jun  4 05:31:03 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-aiohttp-3.14.patch:
+  * Support changes required for aiohttp 3.14.
+
+-------------------------------------------------------------------

New:
----
  support-aiohttp-3.14.patch

----------(New B)----------
  New:
- Add patch support-aiohttp-3.14.patch:
  * Support changes required for aiohttp 3.14.
----------(New E)----------

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

Other differences:
------------------
++++++ python-vcrpy.spec ++++++
--- /var/tmp/diff_new_pack.fDgICh/_old  2026-06-04 18:57:42.293271361 +0200
+++ /var/tmp/diff_new_pack.fDgICh/_new  2026-06-04 18:57:42.293271361 +0200
@@ -25,6 +25,8 @@
 License:        MIT
 URL:            https://github.com/kevin1024/vcrpy
 Source:         
https://files.pythonhosted.org/packages/source/v/vcrpy/vcrpy-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM Based on gh#kevin1024/vcrpy#996
+Patch0:         support-aiohttp-3.14.patch
 BuildRequires:  %{python_module PyYAML}
 BuildRequires:  %{python_module base >= 3.10}
 BuildRequires:  %{python_module pip}

++++++ support-aiohttp-3.14.patch ++++++
>From 1b8c169fb3e69491290ba7b066ad7907112911e9 Mon Sep 17 00:00:00 2001
From: David Sanchez <[email protected]>
Date: Mon, 1 Jun 2026 15:42:43 -0500
Subject: [PATCH] Fix aiohttp 3.14 compatibility (#995)

aiohttp 3.14.0 broke vcrpy's aiohttp stub in two independent ways:

- `aiohttp.streams.AsyncStreamReaderMixin` was removed (internal symbol,
  never in `__all__`; aio-libs/aiohttp#12357), so importing
  `vcr.stubs.aiohttp_stubs` raised `AttributeError` at class-definition time.
  The mixin only added the async-iteration helpers `iter_chunked`/`iter_any`/
  `iter_chunks` on top of `asyncio.StreamReader`; reimplement them directly on
  `MockStream` using aiohttp's 
`AsyncStreamIterator`/`ChunkTupleAsyncStreamIterator`
  (present in both old and new aiohttp).
- `ClientResponse.__init__` now requires a `stream_writer` argument and, when
  `writer is None`, reads `stream_writer.output_size`. Pass a zero-sized writer
  stub when the parameter is present, detected via signature introspection so
  older aiohttp (which has no such parameter) keeps working.

No aiohttp version cap is added; the stub imports and plays back cassettes under
both aiohttp < 3.14 and >= 3.14. Adds `test_stream_chunked` to guard the
async-iteration surface, which the existing suite did not exercise.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
---
 docs/changelog.rst                 |  3 +++
 tests/integration/aiohttp_utils.py |  2 ++
 tests/integration/test_aiohttp.py  | 15 +++++++++++++++
 vcr/stubs/aiohttp_stubs.py         | 29 +++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)

Index: vcrpy-8.1.1/vcr/stubs/aiohttp_stubs.py
===================================================================
--- vcrpy-8.1.1.orig/vcr/stubs/aiohttp_stubs.py
+++ vcrpy-8.1.1/vcr/stubs/aiohttp_stubs.py
@@ -2,10 +2,12 @@
 
 import asyncio
 import functools
+import inspect
 import json
 import logging
 from collections.abc import Mapping
 from http.cookies import CookieError, Morsel, SimpleCookie
+from types import SimpleNamespace
 
 from aiohttp import ClientConnectionError, ClientResponse, CookieJar, 
RequestInfo, hdrs, streams
 from aiohttp.helpers import strip_auth_from_url
@@ -17,13 +19,35 @@ from vcr.request import Request
 
 log = logging.getLogger(__name__)
 
+# aiohttp 3.14 made ``stream_writer`` a required ClientResponse argument and,
+# when ``writer`` is None, reads ``stream_writer.output_size``. A replayed
+# response has already been "sent", so a zero-sized writer is accurate. Older
+# aiohttp doesn't accept the argument at all.
+_CLIENT_RESPONSE_PARAMS = inspect.signature(ClientResponse.__init__).parameters
+_CLIENT_RESPONSE_ACCEPTS_STREAM_WRITER = "stream_writer" in 
_CLIENT_RESPONSE_PARAMS
+
+
+class MockStream(asyncio.StreamReader):
+    # aiohttp added the async-iteration helpers below to its response stream 
via
+    # ``streams.AsyncStreamReaderMixin``, which aiohttp 3.14 removed (folding 
the
+    # helpers into its own ``StreamReader``). This stub builds on
+    # ``asyncio.StreamReader`` instead, so provide the helpers directly to 
keep the
+    # streaming surface stable across aiohttp versions.
+    def iter_chunked(self, n):
+        return streams.AsyncStreamIterator(lambda: self.read(n))
 
-class MockStream(asyncio.StreamReader, streams.AsyncStreamReaderMixin):
-    pass
+    def iter_any(self):
+        return streams.AsyncStreamIterator(self.readany)
+
+    def iter_chunks(self):
+        return streams.ChunkTupleAsyncStreamIterator(self)
 
 
 class MockClientResponse(ClientResponse):
     def __init__(self, method, url, request_info=None):
+        extra = {}
+        if _CLIENT_RESPONSE_ACCEPTS_STREAM_WRITER:
+            extra["stream_writer"] = SimpleNamespace(output_size=0)
         super().__init__(
             method=method,
             url=url,
@@ -34,6 +58,7 @@ class MockClientResponse(ClientResponse)
             traces=None,
             loop=asyncio.get_event_loop(),
             session=None,
+            **extra,
         )
 
     async def json(self, *, encoding="utf-8", loads=json.loads, **kwargs):

Reply via email to