Skip to content

Missing error constants in the version 2.13.0 #2168

@jjuris

Description

@jjuris

Hello

It looks like the most recent version of confluent-kafka 2.13.0 is missing several error constants in the generated cimpl.pyi file.

running ['mypy', '--ignore-missing-imports', '--show-error-codes', 'src/kafkawrapper'] 
src/kafkawrapper/retrying.py:5: error: "type[KafkaError]" has no attribute "REQUEST_TIMED_OUT"  [attr-defined]
src/kafkawrapper/retrying.py:6: error: "type[KafkaError]" has no attribute "NETWORK_EXCEPTION"  [attr-defined]
src/kafkawrapper/retrying.py:7: error: "type[KafkaError]" has no attribute "LEADER_NOT_AVAILABLE"  [attr-defined]
src/kafkawrapper/retrying.py:8: error: "type[KafkaError]" has no attribute "BROKER_NOT_AVAILABLE"  [attr-defined]
src/kafkawrapper/retrying.py:9: error: "type[KafkaError]" has no attribute "INVALID_SESSION_TIMEOUT"  [attr-defined]
src/kafkawrapper/consumer.py:166: error: Argument 1 to "subscribe" of "Consumer" has incompatible type "tuple[Any, ...]"; expected "list[str]"  [arg-type]
src/kafkawrapper/consumer.py:239: error: "type[KafkaError]" has no attribute "_PARTITION_EOF"  [attr-defined]
src/kafkawrapper/consumer.py:240: error: "type[KafkaError]" has no attribute "_TRANSPORT"  [attr-defined]
src/kafkawrapper/consumer.py:243: error: "type[KafkaError]" has no attribute "UNKNOWN_TOPIC_OR_PART"  [attr-defined]
src/kafkawrapper/consumer.py:252: error: Argument 1 to "append" of "list" has incompatible type "Message"; expected "bytes | None"  [arg-type]
src/kafkawrapper/consumer.py:294: error: Exception type must be derived from BaseException (or be a tuple of exception classes)  [misc]
Found 11 errors in 2 files (checked 3 source files)

version 2.12.2 works correctly.

Could you please take a look at this problem?

Best regards,
Jozef

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions