]> git.ipfire.org Git - thirdparty/psycopg.git/commit
feat: make cursors iterators 1064/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 3 May 2025 02:07:37 +0000 (04:07 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 4 May 2025 21:32:02 +0000 (23:32 +0200)
commitdd47b223ba000e3aa91be78ea6a70591cbbd8b81
tree3b1b70a22fb482a31588e92bfd70236927c7cd2c
parent28617e6a0c3fdf8c405015643daa6dc7a09d3693
feat: make cursors iterators

This allows to call `next(cursor)`, which is guaranteed to never return
None, making type checking simpler.
14 files changed:
docs/advanced/typing.rst
docs/api/cursors.rst
docs/news.rst
psycopg/psycopg/_server_cursor.py
psycopg/psycopg/_server_cursor_async.py
psycopg/psycopg/_server_cursor_base.py
psycopg/psycopg/cursor.py
psycopg/psycopg/cursor_async.py
tests/test_cursor_common.py
tests/test_cursor_common_async.py
tests/test_cursor_server.py
tests/test_cursor_server_async.py
tests/test_typing.py
tools/async_to_sync.py