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.2.0~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef75e2e068dc65d4ddce39e176befa8b27e9f58e;p=thirdparty%2Fpsycopg.git fix: add missing pipeline sync in async cursro scroll(). --- 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