dbapi2 set_progress_handler should return integer (#8109)

dbapi2 set_progress_handler callback should return an int according to the
stdlib documentation: https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.set_progress_handler

Fixes #8105
This commit is contained in:
Lefteris Karapetsas
2022-06-20 13:42:58 +02:00
committed by GitHub
parent 34579f1edf
commit 01efba913f

View File

@@ -341,7 +341,7 @@ class Connection:
def set_authorizer(
self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None
) -> None: ...
def set_progress_handler(self, progress_handler: Callable[[], bool | None] | None, n: int) -> None: ...
def set_progress_handler(self, progress_handler: Callable[[], int | None] | None, n: int) -> None: ...
def set_trace_callback(self, trace_callback: Callable[[str], object] | None) -> None: ...
# enable_load_extension and load_extension is not available on python distributions compiled
# without sqlite3 loadable extension support. see footnotes https://docs.python.org/3/library/sqlite3.html#f1