confluent-kafka-python
confluent-kafka-python copied to clipboard
TopicCollection is missing in __all__
Importing TopicCollection as
from confluent_kafka import TopicCollection
raises:
error: Module "confluent_kafka" has no attribute "TopicCollection"
The type is not listed in __all__ at
https://github.com/confluentinc/confluent-kafka-python/blob/5a87879681d28375a55203c4839338b13b668046/src/confluent_kafka/init.py#L25
I am not facing this issue. Can you please provide the output of confluent_kafka.version() command and also the python version you are using.
I'm sorry, this was not ImportError, but mypy's complaint:
error: Module "confluent_kafka" does not explicitly export attribute "TopicCollection" [attr-defined]
Python: 3.12.1 Confluent-Kafka version: ('2.3.0', 33751040)
Got it. I will investigate and update here. No harm in adding in all though. Will raise a PR soon.