From: Daniele Varrazzo Date: Sat, 19 Aug 2023 17:23:38 +0000 (+0100) Subject: fix: add missing pipeline sync in async cursro scroll(). X-Git-Tag: pool-3.1.8~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d10d4b1931f9dda8b38ffd662165058c89d0169;p=thirdparty%2Fpsycopg.git fix: add missing pipeline sync in async cursro scroll(). --- diff --git a/docs/news.rst b/docs/news.rst index bc770323a..ea068839b 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -16,6 +16,7 @@ Psycopg 3.1.11 (unreleased) - Fix integer overflow in C/binary extension with OID > 2^31 (:ticket:`#630`). - Fix possible lack of critical section guard in async `~AsyncCursor.executemany()`. +- Fix missing pipeline fetch in async `~AsyncCursor.scroll()`. Current release diff --git a/psycopg/psycopg/cursor_async.py b/psycopg/psycopg/cursor_async.py index 78acf409e..58fce6420 100644 --- a/psycopg/psycopg/cursor_async.py +++ b/psycopg/psycopg/cursor_async.py @@ -216,6 +216,7 @@ class AsyncCursor(BaseCursor["AsyncConnection[Any]", Row]): yield row async def scroll(self, value: int, mode: str = "relative") -> None: + await self._fetch_pipeline() self._scroll(value, mode) @asynccontextmanager