confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

TopicCollection is missing in __all__

Open pavelschon opened this issue 1 year ago • 3 comments

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

pavelschon avatar Apr 23 '24 09:04 pavelschon

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.

pranavrth avatar Apr 24 '24 22:04 pranavrth

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)

pavelschon avatar Apr 25 '24 11:04 pavelschon

Got it. I will investigate and update here. No harm in adding in all though. Will raise a PR soon.

pranavrth avatar Apr 29 '24 13:04 pranavrth