Skip to content

BrokerConnection API_VERSION has wrong default value in docstring #902

@jeffwidman

Description

@jeffwidman

I'm confused about the API_VERSION default value.

conn.py says:

'api_version': (0, 8, 2), # default to most restrictive

But the docstring for that class says:

api_version (tuple): specify which kafka API version to use. Accepted
values are: (0, 8, 0), (0, 8, 1), (0, 8, 2), (0, 9), (0, 10)
If None, KafkaClient will attempt to infer the broker
version by probing various APIs. Default: None

So the default isn't None, it's (0, 8, 2). Which should be fixed, the docstring or the default value?

I'm think this class is only used by SimpleClient not by the newer KafkaClient async, since I see another set of values here:
https://github.com/dpkp/kafka-python/blob/master/kafka/client_async.py#L78 where both the code and the docstring state the default value is None.

Help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions