diff options
| author | Alexander Smirnov <[email protected]> | 2025-01-14 12:58:32 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2025-01-14 12:58:32 +0000 |
| commit | df99e523b22f89fece96d3e478ead289d0d3e0cd (patch) | |
| tree | aa95b38e2f4984af93e468ca5a22d5f900753c92 /contrib/python | |
| parent | f9605fd1dc2a3d14e71006e2248e8e17c91b3a3f (diff) | |
| parent | 427f8105e6287318fc50beda12bcef5570bdde09 (diff) | |
Merge pull request #13359 from ydb-platform/merge-libs-250114-1110
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/aio/table.py | 9 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/query/transaction.py | 2 | ||||
| -rw-r--r-- | contrib/python/ydb/py3/ydb/ydb_version.py | 2 |
5 files changed, 12 insertions, 5 deletions
diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA index f20c4f4245f..391e0b3f96f 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.18.12 +Version: 3.18.14 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 3407713a344..e0f0e9ce8a7 100644 --- a/contrib/python/ydb/py3/ya.make +++ b/contrib/python/ydb/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.18.12) +VERSION(3.18.14) LICENSE(Apache-2.0) diff --git a/contrib/python/ydb/py3/ydb/aio/table.py b/contrib/python/ydb/py3/ydb/aio/table.py index aec32e1a26e..538f498ba10 100644 --- a/contrib/python/ydb/py3/ydb/aio/table.py +++ b/contrib/python/ydb/py3/ydb/aio/table.py @@ -563,7 +563,14 @@ class SessionPool: async def _get_session_from_queue(self, timeout: float): task_wait = asyncio.ensure_future(asyncio.wait_for(self._active_queue.get(), timeout=timeout)) task_should_stop = asyncio.ensure_future(self._should_stop.wait()) - done, _ = await asyncio.wait((task_wait, task_should_stop), return_when=asyncio.FIRST_COMPLETED) + try: + done, _ = await asyncio.wait((task_wait, task_should_stop), return_when=asyncio.FIRST_COMPLETED) + except asyncio.CancelledError: + cancelled = task_wait.cancel() + if not cancelled: + priority, session = task_wait.result() + self._active_queue.put_nowait((priority, session)) + raise if task_should_stop in done: task_wait.cancel() return self._create() diff --git a/contrib/python/ydb/py3/ydb/query/transaction.py b/contrib/python/ydb/py3/ydb/query/transaction.py index d9c0dfcb3b6..414401da4d1 100644 --- a/contrib/python/ydb/py3/ydb/query/transaction.py +++ b/contrib/python/ydb/py3/ydb/query/transaction.py @@ -283,7 +283,7 @@ class BaseQueryTxContext: ) def _move_to_beginned(self, tx_id: str) -> None: - if self._tx_state._already_in(QueryTxStateEnum.BEGINED): + if self._tx_state._already_in(QueryTxStateEnum.BEGINED) or not tx_id: return self._tx_state._change_state(QueryTxStateEnum.BEGINED) self._tx_state.tx_id = tx_id diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py index 9d48446b091..b40f83ba95b 100644 --- a/contrib/python/ydb/py3/ydb/ydb_version.py +++ b/contrib/python/ydb/py3/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.18.12" +VERSION = "3.18.14" |
