Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add properties to access Client attributes #794

Merged
merged 8 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ v2.0.0 - 2023-xx-xx
* `max_packets` argument in loop(), loop_write() and loop_forever() is removed
* `force` argument in loop_stop() is removed
* method `message_retry_set()` is removed
- Possible breaking change: Add properties to access most Client attribute. Closes #764.
Since this add new properties like `logger`, if a sub-class defined `logger`, the two `logger`
will conflict.
- Add version 2 of user-callback which allow to access MQTTv5 reason code & properties that were
missing from on_publish callback. Also it's more consistent in parameter order or between
MQTTv3 and MQTTv5.
Expand Down
21 changes: 21 additions & 0 deletions migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The list of breaking change (detailed below) are:
* Dropped some deprecated and no used argument or method. If you used them, you can just drop them.
* Improved typing which resulted in few type change. It might no affect you, see below for detail.
* Fixed connect_srv, which changed its signature.
* Added new properties, which could conflict with sub-class

### Versioned the user callbacks

Expand Down Expand Up @@ -218,3 +219,23 @@ for with both paho-mqtt 1.x and 2.0).

connect_srv() didn't took the same argument as connect(). Fixed this, which means the signaure
changed. But since connect_srv was broken in previous version, this should not have any negative impact.

### Added new properties

The Client class added few new properties. If you are using a sub-class of Client and also defined a
attribute, method or properties with the same name, it will conflict.

The added properties are:
* host
* port
* keepalive
* transport
* protocol
* connect_timeout
* username
* password
* max_inflight_messages
* max_queued_messages
* will_topic
* will_payload
* logger
Loading
Loading