From f5f49db0f31313222ce3610557d9850c7ccf6665 Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Fri, 3 Jul 2026 12:37:53 +0300 Subject: Intermediate changes commit_hash:47ec4dd3a2796a69b8ced851063e7f8687b586dd --- contrib/python/ydb/py3/.dist-info/METADATA | 2 +- contrib/python/ydb/py3/ya.make | 2 +- contrib/python/ydb/py3/ydb/convert.py | 11 ++++++++++- contrib/python/ydb/py3/ydb/ydb_version.py | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) (limited to 'contrib/python') diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA index 809298530a7..b8bfb94e02d 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.29.6 +Version: 3.29.7 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 5c39099e85f..db7c11f9961 100644 --- a/contrib/python/ydb/py3/ya.make +++ b/contrib/python/ydb/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.29.6) +VERSION(3.29.7) LICENSE(Apache-2.0) diff --git a/contrib/python/ydb/py3/ydb/convert.py b/contrib/python/ydb/py3/ydb/convert.py index 89f28ecc597..456fd4c9a26 100644 --- a/contrib/python/ydb/py3/ydb/convert.py +++ b/contrib/python/ydb/py3/ydb/convert.py @@ -23,6 +23,15 @@ def _initialize(): _initialize() +class _MissingItemError(AttributeError, KeyError): + # Dotted access to a missing row/struct field used to leak KeyError; since + # 3.29.5 it raises AttributeError (the correct protocol, e.g. for hasattr + # and copy). This combined type is both, so callers that still catch + # KeyError — as they had to before 3.29.5 — keep working alongside the new + # AttributeError. Prefer catching AttributeError in new code. + __slots__ = () + + class _DotDict(dict): # A lazy __dict__ is declared on purpose: it is not materialized until a row # is written to (or its __dict__ is introspected), so untouched read-only @@ -38,7 +47,7 @@ class _DotDict(dict): try: return self[item] except KeyError: - raise AttributeError(item) from None + raise _MissingItemError(item) from None def _is_decimal_signed(hi_value): diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py index 989938e1be0..453174f4b21 100644 --- a/contrib/python/ydb/py3/ydb/ydb_version.py +++ b/contrib/python/ydb/py3/ydb/ydb_version.py @@ -1 +1 @@ -VERSION = "3.29.6" +VERSION = "3.29.7" -- cgit v1.3