From 22de7771c49d886142063a9399c76f46cb005e05 Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Mon, 24 Mar 2025 23:31:48 +0400 Subject: [PATCH] Bump hdbcli to 2.24.* (#13705) --- stubs/hdbcli/@tests/stubtest_allowlist.txt | 3 --- stubs/hdbcli/METADATA.toml | 2 +- stubs/hdbcli/hdbcli/__init__.pyi | 2 ++ stubs/hdbcli/hdbcli/dbapi.pyi | 26 +++++++++++----------- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/stubs/hdbcli/@tests/stubtest_allowlist.txt b/stubs/hdbcli/@tests/stubtest_allowlist.txt index 147dd8fa4..e13c2f2b1 100644 --- a/stubs/hdbcli/@tests/stubtest_allowlist.txt +++ b/stubs/hdbcli/@tests/stubtest_allowlist.txt @@ -1,6 +1,3 @@ -# TODO: missing from stub -hdbcli.__all__ - # Are set to `None` by default, initialized later: hdbcli.dbapi.Error.errorcode hdbcli.dbapi.Error.errortext diff --git a/stubs/hdbcli/METADATA.toml b/stubs/hdbcli/METADATA.toml index 5e6a9f36d..5898c3f9f 100644 --- a/stubs/hdbcli/METADATA.toml +++ b/stubs/hdbcli/METADATA.toml @@ -1,2 +1,2 @@ -version = "2.23.*" +version = "2.24.*" # upstream_repository = closed-source diff --git a/stubs/hdbcli/hdbcli/__init__.pyi b/stubs/hdbcli/hdbcli/__init__.pyi index af0d55ba5..539250c10 100644 --- a/stubs/hdbcli/hdbcli/__init__.pyi +++ b/stubs/hdbcli/hdbcli/__init__.pyi @@ -1,3 +1,5 @@ from . import dbapi as dbapi __version__: str + +__all__ = ["dbapi"] diff --git a/stubs/hdbcli/hdbcli/dbapi.pyi b/stubs/hdbcli/hdbcli/dbapi.pyi index 3d28a2121..2b1282a1f 100644 --- a/stubs/hdbcli/hdbcli/dbapi.pyi +++ b/stubs/hdbcli/hdbcli/dbapi.pyi @@ -1,26 +1,26 @@ import decimal from _typeshed import Incomplete, ReadableBuffer -from collections.abc import Sequence +from collections.abc import Callable, Sequence from datetime import date, datetime, time from types import TracebackType -from typing import Any, Literal, overload +from typing import Any, Final, Literal, overload from typing_extensions import Self, TypeAlias from .resultrow import ResultRow -apilevel: str -threadsafety: int -paramstyle: tuple[str, ...] # hdbcli defines it as a tuple which does not follow PEP 249 +apilevel: Final[str] +threadsafety: Final[int] +paramstyle: Final[tuple[str, ...]] # hdbcli defines it as a tuple which does not follow PEP 249 class Connection: def __init__( self, - address: str, - port: int, - user: str, - password: str, - autocommit: bool = ..., - packetsize: int | None = ..., + address: str = "", + port: int = 0, + user: str = "", + password: str = "", + autocommit: bool = True, + packetsize: int | None = None, userkey: str | None = ..., *, sessionvariables: dict[str, str] | None = ..., @@ -38,7 +38,7 @@ class Connection: def rollback(self) -> None: ... def setautocommit(self, auto: bool = ...) -> None: ... def setclientinfo(self, key: str, value: str | None = ...) -> None: ... - def ontrace(self) -> None: ... + def ontrace(self, callback: Callable[[str], Any], options: str = ...) -> None: ... connect = Connection @@ -66,7 +66,7 @@ class Cursor: def close(self) -> None: ... def description_ext(self) -> Sequence[tuple[Any, ...]]: ... def execute(self, operation: str, parameters: tuple[Any, ...] | None = ...) -> bool: ... - def executemany(self, operation: str, parameters: _Parameters = ...) -> Any: ... + def executemany(self, operation: str, parameters: _Parameters = ..., batcherrors: bool = False) -> Any: ... def executemanyprepared(self, parameters: _Parameters = ...) -> Any: ... def executeprepared(self, parameters: _Parameters = ...) -> Any: ... def fetchone(self, uselob: bool = ...) -> ResultRow | None: ...