psycopg/psycopg/errors.py: E125, E128, E302
# Allow concatenated string literals from async_to_sync
+ psycopg/psycopg/_server_cursor.py: E501
psycopg_pool/psycopg_pool/pool.py: E501
# Pytest's importorskip() getting in the way
+# WARNING: this file is auto-generated by 'async_to_sync.py'
+# from the original file '_server_cursor_async.py'
+# DO NOT CHANGE! Change the original file instead.
"""
-psycopg server-side cursor objects.
+psycopg server-side cursor (sync).
"""
# Copyright (C) 2020 The Psycopg Team
def __del__(self) -> None:
if not self.closed:
warn(
- f"the server-side cursor {self} was deleted while still open."
- " Please use 'with' or '.close()' to close the cursor properly",
+ f"the server-side cursor {self} was deleted while still open. Please use 'with' or '.close()' to close the cursor properly",
ResourceWarning,
)
"""
-psycopg async server-side cursor objects.
+psycopg server-side cursor (async).
"""
# Copyright (C) 2020 The Psycopg Team
)
async def close(self) -> None:
+ """
+ Close the current cursor and free associated resources.
+ """
async with self._conn.lock:
if self.closed:
return
binary: bool | None = None,
**kwargs: Any,
) -> Self:
+ """
+ Open a cursor to execute a query to the database.
+ """
if kwargs:
raise TypeError(f"keyword not supported: {list(kwargs)[0]}")
if self._pgconn.pipeline_status:
async def executemany(
self, query: Query, params_seq: Iterable[Params], *, returning: bool = True
) -> None:
+ """Method not implemented for server-side cursors."""
raise e.NotSupportedError("executemany not supported on server-side cursors")
async def fetchone(self) -> Row | None:
psycopg/psycopg/_copy_async.py
psycopg/psycopg/connection_async.py
psycopg/psycopg/cursor_async.py
+ psycopg/psycopg/_server_cursor_async.py
psycopg_pool/psycopg_pool/null_pool_async.py
psycopg_pool/psycopg_pool/pool_async.py
psycopg_pool/psycopg_pool/sched_async.py
"__aexit__": "__exit__",
"__aiter__": "__iter__",
"_copy_async": "_copy",
+ "_server_cursor_async": "_server_cursor",
"aclose": "close",
"aclosing": "closing",
"acommands": "commands",