From 74de0d75c77d55d8d42d5a5f85d1de2ec4b5414e Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Mon, 10 Nov 2025 13:39:33 +0300 Subject: [PATCH 1/2] Update ydb_topic.py --- ydb/_grpc/grpcwrapper/ydb_topic.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 7744b12f..6c2a5c88 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -479,18 +479,12 @@ class TopicReadSettings(IToProto): def to_proto( self, ) -> ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings: - res = ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings() - res.path = self.path - res.partition_ids.extend(self.partition_ids) - max_lag = proto_duration_from_timedelta(self.max_lag) - if max_lag is not None: - res.max_lag = max_lag - - read_from = proto_timestamp_from_datetime(self.read_from) - if read_from is not None: - res.read_from = read_from - - return res + return ydb_topic_pb2.StreamReadMessage.InitRequest.TopicReadSettings( + path=self.path, + partition_ids=self.partition_ids, + max_lag=proto_duration_from_timedelta(self.max_lag), + read_from=proto_timestamp_from_datetime(self.read_from) + ) @dataclass class InitResponse(IFromProto): From 4f0d206b51db7dbfaff7d532ddba9d1915210109 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Mon, 10 Nov 2025 13:48:27 +0300 Subject: [PATCH 2/2] Update ydb_topic.py --- ydb/_grpc/grpcwrapper/ydb_topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/_grpc/grpcwrapper/ydb_topic.py b/ydb/_grpc/grpcwrapper/ydb_topic.py index 6c2a5c88..5b0c41a7 100644 --- a/ydb/_grpc/grpcwrapper/ydb_topic.py +++ b/ydb/_grpc/grpcwrapper/ydb_topic.py @@ -483,7 +483,7 @@ def to_proto( path=self.path, partition_ids=self.partition_ids, max_lag=proto_duration_from_timedelta(self.max_lag), - read_from=proto_timestamp_from_datetime(self.read_from) + read_from=proto_timestamp_from_datetime(self.read_from), ) @dataclass