Skip to content

Misleading docs re: CallbackAPIVersion #896

@rittneje

Description

@rittneje

The docstring for the paho.mqtt.client.Client constructor currently states:

:param CallbackAPIVersion callback_api_version: define the API version for user-callback (on_connect, on_publish,...).
This field is required and it's recommended to use the latest version (CallbackAPIVersion.API_VERSION2).
See each callback for description of API for each version. The file docs/migrations.rst contains details on
how to migrate between version.

However, this is not true. This parameter is not required and defaults to VERSION1.

callback_api_version: CallbackAPIVersion = CallbackAPIVersion.VERSION1,

The docstring is also wrong because it has the wrong constant for the CallbackAPIVersion enum.

The migration guide also does not make this situation particularly clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions