From ef75e2e068dc65d4ddce39e176befa8b27e9f58e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 19 Aug 2023 18:23:38 +0100 Subject: [PATCH] fix: add missing pipeline sync in async cursro scroll(). --- docs/news.rst | 1 + psycopg/psycopg/cursor_async.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/news.rst b/docs/news.rst index fc823cf32..b13400710 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -34,6 +34,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 -- 2.47.3