diff options
| author | robot-piglet <[email protected]> | 2026-04-24 10:23:47 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2026-04-24 10:57:36 +0300 |
| commit | 55a42d4bc7fb22bae0e97d76e7043d43588044b6 (patch) | |
| tree | b311a767bc301c6a4f0da289858118f40b907796 /contrib/python | |
| parent | b03eeb69fee84db10a477a89a3716fe92ff42c79 (diff) | |
Intermediate changes
commit_hash:c9efcc80ce50d6cc78a55c5f0a73596fdb28e1f6
Diffstat (limited to 'contrib/python')
| -rw-r--r-- | contrib/python/ydb/py3/.dist-info/METADATA | 2 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ya.make | 2 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/common_utils.py | 26 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_query_public_types.py | 11 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py | 2 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/_topic_reader/datatypes.py | 6 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/aio/query/pool.py | 51 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/aio/query/transaction.py | 3 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/driver.py | 4 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/iam/auth.py | 23 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/issues.py | 6 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/query/pool.py | 5 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/query/session.py | 24 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/query/transaction.py | 24 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/ydb_version.py | 2 |
15 files changed, 96 insertions, 95 deletions
diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA index e058dd2ebed..51d9ebee2ed 100644 --- a/contrib/python/ydb/py3/.dist-info/METADATA +++ b/contrib/python/ydb/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ydb -Version: 3.28.0 +Version: 3.28.1 Summary: YDB Python SDK Home-page: http://github.com/ydb-platform/ydb-python-sdk Author: Yandex LLC diff --git a/contrib/python/ydb/py3/ya.make b/contrib/python/ydb/py3/ya.make index f94ac2c0cfc..5bb09ac2d2e 100644 --- a/contrib/python/ydb/py3/ya.make +++ b/contrib/python/ydb/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.28.0) +VERSION(3.28.1) LICENSE(Apache-2.0) diff --git a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/common_utils.py b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/common_utils.py index a2b2c966ef5..10fb522646b 100644 --- a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/common_utils.py +++ b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/common_utils.py @@ -56,8 +56,7 @@ class IFromProto(abc.ABC, Generic[ProtoT, ResultT]): @staticmethod @abc.abstractmethod - def from_proto(msg: ProtoT) -> ResultT: - ... + def from_proto(msg: ProtoT) -> ResultT: ... class IFromProtoWithProtoType(IFromProto[ProtoT, ResultT]): @@ -65,27 +64,23 @@ class IFromProtoWithProtoType(IFromProto[ProtoT, ResultT]): @staticmethod @abc.abstractmethod - def empty_proto_message() -> ProtoT: - ... + def empty_proto_message() -> ProtoT: ... class IToProto(abc.ABC): @abc.abstractmethod - def to_proto(self) -> Message: - ... + def to_proto(self) -> Message: ... class IFromPublic(abc.ABC): @staticmethod @abc.abstractmethod - def from_public(o: typing.Any) -> typing.Any: - ... + def from_public(o: typing.Any) -> typing.Any: ... class IToPublic(abc.ABC): @abc.abstractmethod - def to_public(self) -> typing.Any: - ... + def to_public(self) -> typing.Any: ... class UnknownGrpcMessageError(issues.Error): @@ -150,16 +145,13 @@ class SyncToAsyncIterator: class IGrpcWrapperAsyncIO(abc.ABC): @abc.abstractmethod - async def receive(self, timeout: Optional[int] = None) -> Any: - ... + async def receive(self, timeout: Optional[int] = None) -> Any: ... @abc.abstractmethod - def write(self, wrap_message: IToProto): - ... + def write(self, wrap_message: IToProto): ... @abc.abstractmethod - def close(self): - ... + def close(self): ... # SupportedDriverType imported from ydb._typing @@ -297,7 +289,7 @@ class ServerStatus( msg: Union[ ydb_topic_pb2.StreamReadMessage.FromServer, ydb_topic_pb2.StreamWriteMessage.FromServer, - ] + ], ) -> "ServerStatus": return ServerStatus(msg.status, msg.issues) diff --git a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_query_public_types.py b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_query_public_types.py index c48f8dc18a8..8aba07329e8 100644 --- a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_query_public_types.py +++ b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_query_public_types.py @@ -67,11 +67,12 @@ class QuerySerializableReadWrite(BaseQueryTxMode): class QueryOnlineReadOnly(BaseQueryTxMode): """Each read operation in the transaction is reading the data that is most recent at execution time. The consistency of retrieved data depends on the allow_inconsistent_reads setting: - * false (consistent reads): Each individual read operation returns consistent data, - but no consistency is guaranteed between reads. - Reading the same table range twice may return different results. - * true (inconsistent reads): Even the data fetched by a particular - read operation may contain inconsistent results. + + * false (consistent reads): Each individual read operation returns consistent data, + but no consistency is guaranteed between reads. + Reading the same table range twice may return different results. + * true (inconsistent reads): Even the data fetched by a particular + read operation may contain inconsistent results. """ def __init__(self, allow_inconsistent_reads: bool = False): diff --git a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py index 0a05a6e00fa..4473649ba79 100644 --- a/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/contrib/python/ydb/py3/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -79,7 +79,7 @@ class SupportedCodecs( @staticmethod def from_public( - codecs: Optional[List[Union[ydb_topic_public_types.PublicCodec, int]]] + codecs: Optional[List[Union[ydb_topic_public_types.PublicCodec, int]]], ) -> Optional["SupportedCodecs"]: if codecs is None: return None diff --git a/contrib/python/ydb/py3/ydb/_topic_reader/datatypes.py b/contrib/python/ydb/py3/ydb/_topic_reader/datatypes.py index e1745bbe584..f5850dbd418 100644 --- a/contrib/python/ydb/py3/ydb/_topic_reader/datatypes.py +++ b/contrib/python/ydb/py3/ydb/_topic_reader/datatypes.py @@ -15,12 +15,10 @@ from ydb._topic_reader import topic_reader_asyncio class ICommittable(abc.ABC): @abc.abstractmethod - def _commit_get_partition_session(self) -> PartitionSession: - ... + def _commit_get_partition_session(self) -> PartitionSession: ... @abc.abstractmethod - def _commit_get_offsets_range(self) -> OffsetsRange: - ... + def _commit_get_offsets_range(self) -> OffsetsRange: ... class ISessionAlive(abc.ABC): diff --git a/contrib/python/ydb/py3/ydb/aio/query/pool.py b/contrib/python/ydb/py3/ydb/aio/query/pool.py index 7561a21bc76..45fa1acbe9b 100644 --- a/contrib/python/ydb/py3/ydb/aio/query/pool.py +++ b/contrib/python/ydb/py3/ydb/aio/query/pool.py @@ -21,6 +21,7 @@ from ...retries import ( from ...query.base import BaseQueryTxMode, QueryExplainResultFormat from ...query.base import QueryClientSettings from ... import convert +from ... import issues from ..._grpc.grpcwrapper import common_utils from ..._grpc.grpcwrapper import ydb_query_public_types as _ydb_query_public @@ -49,7 +50,6 @@ class QuerySessionPool: self._should_stop = asyncio.Event() self._queue: asyncio.Queue[QuerySession] = asyncio.Queue() self._current_size = 0 - self._waiters = 0 self._loop = asyncio.get_running_loop() if loop is None else loop self._query_client_settings = query_client_settings @@ -59,9 +59,12 @@ class QuerySessionPool: logger.debug(f"New session was created for pool. Session id: {session.session_id}") return session - async def acquire(self) -> QuerySession: + async def acquire(self, timeout: Optional[float] = None) -> QuerySession: """Acquire a session from Session Pool. + :param timeout: Seconds to wait when pool is exhausted. Overrides the pool-level acquire_timeout. + None falls back to the pool-level default (which is also None — wait indefinitely). + :return A QuerySession object. """ @@ -69,6 +72,8 @@ class QuerySessionPool: logger.error("An attempt to take session from closed session pool.") raise RuntimeError("An attempt to take session from closed session pool.") + effective_timeout = timeout + session = None try: session = self._queue.get_nowait() @@ -77,20 +82,36 @@ class QuerySessionPool: if session is None and self._current_size == self._size: queue_get = asyncio.ensure_future(self._queue.get()) - task_stop = asyncio.ensure_future(asyncio.ensure_future(self._should_stop.wait())) + task_stop = asyncio.ensure_future(self._should_stop.wait()) + task_timeout = ( + asyncio.ensure_future(asyncio.sleep(effective_timeout)) if effective_timeout is not None else None + ) + wait_tasks = [t for t in (queue_get, task_stop, task_timeout) if t is not None] try: - done, _ = await asyncio.wait((queue_get, task_stop), return_when=asyncio.FIRST_COMPLETED) + done, _ = await asyncio.wait(wait_tasks, return_when=asyncio.FIRST_COMPLETED) except asyncio.CancelledError: task_stop.cancel() + if task_timeout is not None: + task_timeout.cancel() cancelled = queue_get.cancel() if not cancelled and not queue_get.exception(): await self.release(queue_get.result()) raise + + task_stop.cancel() + if task_timeout is not None: + task_timeout.cancel() + if task_stop in done: queue_get.cancel() raise RuntimeError("An attempt to take session from closed session pool.") - task_stop.cancel() + if task_timeout is not None and task_timeout in done: + cancelled = queue_get.cancel() + if not cancelled and not queue_get.exception(): + await self.release(queue_get.result()) + raise issues.SessionPoolEmpty("Timeout on acquire session") + session = queue_get.result() if session is not None: @@ -120,10 +141,13 @@ class QuerySessionPool: self._queue.put_nowait(session) logger.debug("Session returned to queue: %s", session.session_id) - def checkout(self) -> "SimpleQuerySessionCheckoutAsync": - """Return a Session context manager, that acquires session on enter and releases session on exit.""" + def checkout(self, timeout: Optional[float] = None) -> "SimpleQuerySessionCheckoutAsync": + """Return a Session context manager, that acquires session on enter and releases session on exit. + + :param timeout: Seconds to wait when pool is exhausted. Overrides the pool-level acquire_timeout. + """ - return SimpleQuerySessionCheckoutAsync(self) + return SimpleQuerySessionCheckoutAsync(self, timeout) async def retry_operation_async( self, callee: Callable, retry_settings: Optional[RetrySettings] = None, *args, **kwargs @@ -139,7 +163,7 @@ class QuerySessionPool: retry_settings = RetrySettings() if retry_settings is None else retry_settings async def wrapped_callee(): - async with self.checkout() as session: + async with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: return await callee(session, *args, **kwargs) return await retry_operation_async(wrapped_callee, retry_settings) @@ -170,7 +194,7 @@ class QuerySessionPool: retry_settings = RetrySettings() if retry_settings is None else retry_settings async def wrapped_callee(): - async with self.checkout() as session: + async with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: async with session.transaction(tx_mode=tx_mode) as tx: if tx_mode.name in ["serializable_read_write", "snapshot_read_only"]: await tx.begin() @@ -202,7 +226,7 @@ class QuerySessionPool: retry_settings = RetrySettings() if retry_settings is None else retry_settings async def wrapped_callee(): - async with self.checkout() as session: + async with self.checkout(timeout=retry_settings.max_session_acquire_timeout) as session: it = await session.execute(query, parameters, *args, **kwargs) return [result_set async for result_set in it] @@ -256,12 +280,13 @@ class QuerySessionPool: class SimpleQuerySessionCheckoutAsync: _session: Optional[QuerySession] - def __init__(self, pool: QuerySessionPool): + def __init__(self, pool: QuerySessionPool, timeout: Optional[float] = None): self._pool = pool + self._timeout = timeout self._session = None async def __aenter__(self) -> QuerySession: - self._session = await self._pool.acquire() + self._session = await self._pool.acquire(timeout=self._timeout) return self._session async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: diff --git a/contrib/python/ydb/py3/ydb/aio/query/transaction.py b/contrib/python/ydb/py3/ydb/aio/query/transaction.py index 69c7747873a..e423258025f 100644 --- a/contrib/python/ydb/py3/ydb/aio/query/transaction.py +++ b/contrib/python/ydb/py3/ydb/aio/query/transaction.py @@ -70,6 +70,9 @@ class QueryTxContext(BaseQueryTxContext["AsyncDriver"]): await self.rollback() except issues.Error: logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + except BaseException: + logger.warning("Failed to rollback leaked tx: %s", self._tx_state.tx_id) + self.session._invalidate() async def _ensure_prev_stream_finished(self) -> None: if self._prev_stream is not None: diff --git a/contrib/python/ydb/py3/ydb/driver.py b/contrib/python/ydb/py3/ydb/driver.py index 7c123823d2f..814408ad671 100644 --- a/contrib/python/ydb/py3/ydb/driver.py +++ b/contrib/python/ydb/py3/ydb/driver.py @@ -6,7 +6,6 @@ from typing import Any, List, Optional, Tuple, Type, TYPE_CHECKING from . import credentials as credentials_impl, table, scheme, pool from . import tracing -from . import iam from . import _utilities if TYPE_CHECKING: @@ -63,6 +62,7 @@ def credentials_from_env_variables(tracer: Optional[tracing.Tracer] = None) -> " metadata_credentials = os.getenv("YDB_METADATA_CREDENTIALS", "0") == "1" if metadata_credentials: ctx.trace({"credentials.metadata": True}) + from . import iam return iam.MetadataUrlCredentials(tracer=tracer) @@ -84,6 +84,8 @@ def credentials_from_env_variables(tracer: Optional[tracing.Tracer] = None) -> " "credentials.metadata": True, } ) + from . import iam + return iam.MetadataUrlCredentials(tracer=tracer) diff --git a/contrib/python/ydb/py3/ydb/iam/auth.py b/contrib/python/ydb/py3/ydb/iam/auth.py index a43c30afa23..5a459c3beab 100644 --- a/contrib/python/ydb/py3/ydb/iam/auth.py +++ b/contrib/python/ydb/py3/ydb/iam/auth.py @@ -8,11 +8,6 @@ import json import os try: - import jwt -except ImportError: - jwt = None # type: ignore[assignment] - -try: from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc from yandex.cloud.iam.v1 import iam_token_service_pb2 except ImportError: @@ -29,19 +24,16 @@ except ImportError: iam_token_service_pb2_grpc = None iam_token_service_pb2 = None -try: - import requests -except ImportError: - requests = None # type: ignore - - DEFAULT_METADATA_URL = "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token" YANDEX_CLOUD_IAM_TOKEN_SERVICE_URL = "https://iam.api.cloud.yandex.net/iam/v1/tokens" YANDEX_CLOUD_JWT_ALGORITHM = "PS256" def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout, algorithm, token_service_url, subject=None): - assert jwt is not None, "Install pyjwt library to use jwt tokens" + try: + import jwt + except ImportError as e: + raise ImportError("Install pyjwt library to use jwt tokens") from e now = time.time() now_utc = datetime.fromtimestamp(now, timezone.utc) exp_utc = datetime.fromtimestamp(now + jwt_expiration_timeout, timezone.utc) @@ -180,7 +172,10 @@ class MetadataUrlCredentials(credentials.AbstractExpiringTokenCredentials): :param ydb.Tracer tracer: ydb tracer """ super(MetadataUrlCredentials, self).__init__(tracer) - assert requests is not None, "Install requests library to use metadata credentials provider" + try: + import requests # noqa: F401 + except ImportError as e: + raise ImportError("Install requests library to use metadata credentials provider") from e self.extra_error_message = ( "Check that metadata service configured properly since we failed to fetch it from metadata_url." ) @@ -188,6 +183,8 @@ class MetadataUrlCredentials(credentials.AbstractExpiringTokenCredentials): @tracing.with_trace() def _make_token_request(self): + import requests + response = requests.get(self._metadata_url, headers={"Metadata-Flavor": "Google"}, timeout=3) response.raise_for_status() return json.loads(response.text) diff --git a/contrib/python/ydb/py3/ydb/issues.py b/contrib/python/ydb/py3/ydb/issues.py index d3ae4f1f707..c4d6c301d28 100644 --- a/contrib/python/ydb/py3/ydb/issues.py +++ b/contrib/python/ydb/py3/ydb/issues.py @@ -20,12 +20,10 @@ class _StatusResponseProtocol(Protocol): """Protocol for objects that have status and issues attributes.""" @property - def status(self) -> Union[StatusCode, int]: - ... + def status(self) -> Union[StatusCode, int]: ... @property - def issues(self) -> Iterable[Any]: - ... + def issues(self) -> Iterable[Any]: ... _TRANSPORT_STATUSES_FIRST = 401000 diff --git a/contrib/python/ydb/py3/ydb/query/pool.py b/contrib/python/ydb/py3/ydb/query/pool.py index af3443654bd..cba3e47e3a1 100644 --- a/contrib/python/ydb/py3/ydb/query/pool.py +++ b/contrib/python/ydb/py3/ydb/query/pool.py @@ -52,7 +52,7 @@ class QuerySessionPool: :param driver: A driver instance. :param size: Max size of Session Pool. :param query_client_settings: ydb.QueryClientSettings object to configure QueryService behavior - :param workers_threads_count: A number of threads in executor used for *_async methods + :param workers_threads_count: A number of threads in executor used for ``*_async`` methods """ self._driver = driver @@ -73,7 +73,8 @@ class QuerySessionPool: def acquire(self, timeout: Optional[float] = None) -> QuerySession: """Acquire a session from Session Pool. - :param timeout: A timeout to wait in seconds. + :param timeout: Seconds to wait when pool is exhausted. Overrides the pool-level acquire_timeout. + None falls back to the pool-level default (which is also None — wait indefinitely). :return A QuerySession object. """ diff --git a/contrib/python/ydb/py3/ydb/query/session.py b/contrib/python/ydb/py3/ydb/query/session.py index b21c6ba4acb..af4b7ec6b06 100644 --- a/contrib/python/ydb/py3/ydb/query/session.py +++ b/contrib/python/ydb/py3/ydb/query/session.py @@ -144,14 +144,12 @@ class BaseQuerySession(abc.ABC, Generic[DriverT]): @overload def _create_call( self: "BaseQuerySession[SyncDriver]", settings: Optional[BaseRequestSettings] = None - ) -> "BaseQuerySession[SyncDriver]": - ... + ) -> "BaseQuerySession[SyncDriver]": ... @overload def _create_call( self: "BaseQuerySession[AsyncDriver]", settings: Optional[BaseRequestSettings] = None - ) -> Awaitable["BaseQuerySession[AsyncDriver]"]: - ... + ) -> Awaitable["BaseQuerySession[AsyncDriver]"]: ... def _create_call( self, settings: Optional[BaseRequestSettings] = None @@ -170,14 +168,12 @@ class BaseQuerySession(abc.ABC, Generic[DriverT]): @overload def _delete_call( self: "BaseQuerySession[SyncDriver]", settings: Optional[BaseRequestSettings] = None - ) -> "BaseQuerySession[SyncDriver]": - ... + ) -> "BaseQuerySession[SyncDriver]": ... @overload def _delete_call( self: "BaseQuerySession[AsyncDriver]", settings: Optional[BaseRequestSettings] = None - ) -> Awaitable["BaseQuerySession[AsyncDriver]"]: - ... + ) -> Awaitable["BaseQuerySession[AsyncDriver]"]: ... def _delete_call( self, settings: Optional[BaseRequestSettings] = None @@ -197,14 +193,12 @@ class BaseQuerySession(abc.ABC, Generic[DriverT]): @overload def _attach_call( self: "BaseQuerySession[SyncDriver]", - ) -> GrpcStreamCall[_apis.ydb_query.SessionState]: - ... + ) -> GrpcStreamCall[_apis.ydb_query.SessionState]: ... @overload def _attach_call( self: "BaseQuerySession[AsyncDriver]", - ) -> Awaitable[GrpcStreamCall[_apis.ydb_query.SessionState]]: - ... + ) -> Awaitable[GrpcStreamCall[_apis.ydb_query.SessionState]]: ... def _attach_call( self, @@ -233,8 +227,7 @@ class BaseQuerySession(abc.ABC, Generic[DriverT]): arrow_format_settings: Optional[base.ArrowFormatSettings] = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, - ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: - ... + ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: ... @overload def _execute_call( @@ -250,8 +243,7 @@ class BaseQuerySession(abc.ABC, Generic[DriverT]): arrow_format_settings: Optional[base.ArrowFormatSettings] = None, concurrent_result_sets: bool = False, settings: Optional[BaseRequestSettings] = None, - ) -> Awaitable[Iterable[_apis.ydb_query.ExecuteQueryResponsePart]]: - ... + ) -> Awaitable[Iterable[_apis.ydb_query.ExecuteQueryResponsePart]]: ... def _execute_call( self, diff --git a/contrib/python/ydb/py3/ydb/query/transaction.py b/contrib/python/ydb/py3/ydb/query/transaction.py index 687a5eaf733..fdcefb0b801 100644 --- a/contrib/python/ydb/py3/ydb/query/transaction.py +++ b/contrib/python/ydb/py3/ydb/query/transaction.py @@ -285,14 +285,12 @@ class BaseQueryTxContext(base.CallbackHandler, Generic[DriverT]): @overload def _begin_call( self: "BaseQueryTxContext[SyncDriver]", settings: Optional[BaseRequestSettings] - ) -> "BaseQueryTxContext[SyncDriver]": - ... + ) -> "BaseQueryTxContext[SyncDriver]": ... @overload def _begin_call( self: "BaseQueryTxContext[AsyncDriver]", settings: Optional[BaseRequestSettings] - ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: - ... + ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: ... def _begin_call( self, settings: Optional[BaseRequestSettings] @@ -314,14 +312,12 @@ class BaseQueryTxContext(base.CallbackHandler, Generic[DriverT]): @overload def _commit_call( self: "BaseQueryTxContext[SyncDriver]", settings: Optional[BaseRequestSettings] - ) -> "BaseQueryTxContext[SyncDriver]": - ... + ) -> "BaseQueryTxContext[SyncDriver]": ... @overload def _commit_call( self: "BaseQueryTxContext[AsyncDriver]", settings: Optional[BaseRequestSettings] - ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: - ... + ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: ... def _commit_call( self, settings: Optional[BaseRequestSettings] @@ -344,14 +340,12 @@ class BaseQueryTxContext(base.CallbackHandler, Generic[DriverT]): @overload def _rollback_call( self: "BaseQueryTxContext[SyncDriver]", settings: Optional[BaseRequestSettings] - ) -> "BaseQueryTxContext[SyncDriver]": - ... + ) -> "BaseQueryTxContext[SyncDriver]": ... @overload def _rollback_call( self: "BaseQueryTxContext[AsyncDriver]", settings: Optional[BaseRequestSettings] - ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: - ... + ) -> Awaitable["BaseQueryTxContext[AsyncDriver]"]: ... def _rollback_call( self, settings: Optional[BaseRequestSettings] @@ -385,8 +379,7 @@ class BaseQueryTxContext(base.CallbackHandler, Generic[DriverT]): arrow_format_settings: Optional[base.ArrowFormatSettings], concurrent_result_sets: Optional[bool], settings: Optional[BaseRequestSettings], - ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: - ... + ) -> Iterable[_apis.ydb_query.ExecuteQueryResponsePart]: ... @overload def _execute_call( @@ -402,8 +395,7 @@ class BaseQueryTxContext(base.CallbackHandler, Generic[DriverT]): arrow_format_settings: Optional[base.ArrowFormatSettings], concurrent_result_sets: Optional[bool], settings: Optional[BaseRequestSettings], - ) -> Awaitable[Iterable[_apis.ydb_query.ExecuteQueryResponsePart]]: - ... + ) -> Awaitable[Iterable[_apis.ydb_query.ExecuteQueryResponsePart]]: ... def _execute_call( self, diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py index 19ff2992179..fb99e7eeda8 100644 --- a/contrib/python/ydb/py3/ydb/ydb_version.py +++ b/contrib/python/ydb/py3/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.28.0" +VERSION = "3.28.1" |
