From 139ce2c98c348cf07e9d90b059d32d4c440c94d3 Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Fri, 13 Jan 2023 08:44:09 +0100 Subject: [PATCH] Internal TopicPartition in admin --- src/confluent_kafka/admin/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/confluent_kafka/admin/__init__.py b/src/confluent_kafka/admin/__init__.py index 4c7ec589..ddd09c38 100644 --- a/src/confluent_kafka/admin/__init__.py +++ b/src/confluent_kafka/admin/__init__.py @@ -45,7 +45,7 @@ _AdminClientImpl, NewTopic, NewPartitions, - TopicPartition, + TopicPartition as _TopicPartition, CONFIG_SOURCE_UNKNOWN_CONFIG, CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG, CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG, @@ -290,7 +290,7 @@ def _check_list_consumer_group_offsets_request(request): for topic_partition in req.topic_partitions: if topic_partition is None: raise ValueError("Element of 'topic_partitions' cannot be None") - if not isinstance(topic_partition, TopicPartition): + if not isinstance(topic_partition, _TopicPartition): raise TypeError("Element of 'topic_partitions' must be of type TopicPartition") if topic_partition.topic is None: raise TypeError("Element of 'topic_partitions' must not have 'topic' attribute as None") @@ -328,7 +328,7 @@ def _check_alter_consumer_group_offsets_request(request): for topic_partition in req.topic_partitions: if topic_partition is None: raise ValueError("Element of 'topic_partitions' cannot be None") - if not isinstance(topic_partition, TopicPartition): + if not isinstance(topic_partition, _TopicPartition): raise TypeError("Element of 'topic_partitions' must be of type TopicPartition") if topic_partition.topic is None: raise TypeError("Element of 'topic_partitions' must not have 'topic' attribute as None")