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

chore(deps): bump paho-mqtt from 1.6.1 to 2.1.0 #288

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 13, 2025

Bumps paho-mqtt from 1.6.1 to 2.1.0.

Release notes

Sourced from paho-mqtt's releases.

v2.1.0

  • Make transition from 1.x to 2.x version smoother (Closes #831)
  • Fix "protocol" property (Closes #820)
  • Fix publish() a bytearray payload (Closes #833)
  • Fix some type annotations (Closes #828)
  • Fix loop_stop() not stopping thread when called from callback (Closes #809)
  • Fix some documentation errors (Closes #817, #823, #832, #838)
  • Add support for Unix socket (Closes #829)
  • Fix flaky test (Closes #789)

v2.0.0

This release include breaking change. See https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html for more details on how to upgrade.

This release also introduce new documentation available online at https://eclipse.dev/paho/files/paho.mqtt.python/html/index.html

  • BREAKING Added callback_api_version. This break ALL users of paho-mqtt Client class. See migrations.rst for details on how to upgrade. tl; dr; add CallbackAPIVersion.VERSION1 to first argument of Client()
  • BREAKING Drop support for Python 2.7, Python 3.5 and Python 3.6 Minimum tested version is Python 3.7 Python version up to Python 3.12 are tested.
  • BREAKING connect_srv changed it signature to take an additional bind_port parameter. This is a breaking change, but in previous version connect_srv was broken anyway. Closes #493.
  • BREAKING Remove some deprecated argument and method:
    • 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
  • BREAKING Remove the base62, WebsocketWrapper and ConnectionState, as user shouldn't directly use them.
  • 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.
  • Add types to Client class, which caused few change which should be compatible. Known risk of breaking changes:
    • Use enum for returned error code (like MQTT_ERR_SUCCESS). It use an IntEnum which should be a drop-in replacement. Excepted if someone is doing "rc is 0" instead of "rc == 0".
    • reason in on_connect callback when using MQTTv5 is now always a ReasonCode object. It used to possibly be an integer with the value 132.
    • MQTTMessage field "dup" and "retain" used to be integer with value 0 and 1. They are now boolean.
  • Add support for ALPN protocols on TLS connection. Closes #790 & #648.
  • Add on_pre_connect() callback, which is called immediately before a connection attempt is made.
  • Fix subscribe.simple with MQTTv5. Closes #707.
  • Use better name for thread started by loop_start. Closes #617.
  • Fix possible bug during disconnection where self._sock is unexpectedly None. Closes #686 & #505.
  • Fix loading too weak TLS CA file but setting allowed ciphers before loading CA. Closes #676.
  • Allow to manually ack QoS > 0 messages. Closes #753 & #348.

... (truncated)

Changelog

Sourced from paho-mqtt's changelog.

v2.1.0 - 2024-04-29

  • Make transition from 1.x to 2.x version smoother (Closes #831)
  • Fix "protocol" property (Closes #820)
  • Fix publish() a bytearray payload (Closes #833)
  • Fix some type annotations (Closes #828)
  • Fix loop_stop() not stopping thread when called from callback (Closes #809)
  • Fix some documentation errors (Closes #817, #823, #832, #838)
  • Add support for Unix socket (Closes #829)
  • Fix flaky test (Closes #789)

v2.0.0 - 2024-02-10

This release include breaking change. See migrations <https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html>_ for more details on how to upgrade.

  • BREAKING Added callback_api_version. This break ALL users of paho-mqtt Client class. See docs/migrations.rst or online version <https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html>_ for details on how to upgrade. tl; dr; add CallbackAPIVersion.VERSION1 to first argument of Client()

  • BREAKING Drop support for Python 2.7, Python 3.5 and Python 3.6 Minimum tested version is Python 3.7 Python version up to Python 3.12 are tested.

  • BREAKING connect_srv changed it signature to take an additional bind_port parameter. This is a breaking change, but in previous version connect_srv was broken anyway. Closes #493.

  • BREAKING Remove some deprecated argument and method:

    • 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
  • BREAKING Remove the base62, WebsocketWrapper and ConnectionState, as user shouldn't directly use them.

  • 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.

  • Add types to Client class, which caused few change which should be compatible. Known risk of breaking changes:

    • Use enum for returned error code (like MQTT_ERR_SUCCESS). It use an IntEnum which should be a drop-in replacement. Excepted if someone is doing "rc is 0" instead of "rc == 0".
    • reason in on_connect callback when using MQTTv5 is now always a ReasonCode object. It used to possibly be an integer with the value 132.
    • MQTTMessage field "dup" and "retain" used to be integer with value 0 and 1. They are now boolean.
  • Add support for ALPN protocols on TLS connection. Closes #790 & #648.

  • Add on_pre_connect() callback, which is called immediately before a connection attempt is made.

... (truncated)

Commits
  • af64a43 Bump version to 2.1.0
  • 54e2e69 Update changelog
  • 0776a00 Merge pull request #839 from eclipse/fix-bytearray-payload
  • 7795dcd Fix publish() a bytearray payload
  • 29c1d43 Merge pull request #838 from REX2626/master
  • 27bbdc3 Merge pull request #829 from akrpic77/ak_add_unix_transport
  • a0554dd Fix linter report
  • 8503635 Merge pull request #832 from eclipse/fix-link-to-migrations
  • e96ff75 Try to fix tests
  • d4d0715 Fix tests with msg.retain value check
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 13, 2025
@Lash-L
Copy link
Collaborator

Lash-L commented Jan 13, 2025

@allenporter youre touching a lot of this right now - this a bump you wanna approve? Seems it breaks things

@dependabot dependabot bot force-pushed the 325adependabot/pip/paho-mqtt-2.1.0 branch from 5e57541 to 2a84279 Compare January 13, 2025 12:44
@allenporter
Copy link
Contributor

Happy to handle this since i've been staring closely at the paho mqtt code in the last few days.

I think that home assistant has a hard dependency on 1.6.1 so we'll probably have to upgrade in lockstep with other projects if we want to keep releases flowing upstream. I noticed that it has been on that version for a couple years, so may require understanding how large scope it is to update home assistant itself.

@Lash-L
Copy link
Collaborator

Lash-L commented Jan 13, 2025

Happy to handle this since i've been staring closely at the paho mqtt code in the last few days.

I think that home assistant has a hard dependency on 1.6.1 so we'll probably have to upgrade in lockstep with other projects if we want to keep releases flowing upstream. I noticed that it has been on that version for a couple years, so may require understanding how large scope it is to update home assistant itself.

Ah yeah, seems like the mqtt integration itself relies on that versioning. Not a huge deal as it's working for us, and as long as we aren't holding back HA as a whole, then i'm fine either way.

But 1.6.1 is 3+ years out of date now, I'm not sure what all we are potentially missing out on that could be helpful here though

@allenporter
Copy link
Contributor

Happy to handle this since i've been staring closely at the paho mqtt code in the last few days.
I think that home assistant has a hard dependency on 1.6.1 so we'll probably have to upgrade in lockstep with other projects if we want to keep releases flowing upstream. I noticed that it has been on that version for a couple years, so may require understanding how large scope it is to update home assistant itself.

Ah yeah, seems like the mqtt integration itself relies on that versioning. Not a huge deal as it's working for us, and as long as we aren't holding back HA as a whole, then i'm fine either way.

But 1.6.1 is 3+ years out of date now, I'm not sure what all we are potentially missing out on that could be helpful here though

Agreed with what you said. Perhaps there are reliability fixes etc that resolve issues that required overriding, changing client ids and restarting any broken threads.

@allenporter
Copy link
Contributor

@dependabot rebase

Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 21, 2025

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@allenporter
Copy link
Contributor

@dependabot recreate

Bumps [paho-mqtt](https://github.com/eclipse/paho.mqtt.python) from 1.6.1 to 2.1.0.
- [Release notes](https://github.com/eclipse/paho.mqtt.python/releases)
- [Changelog](https://github.com/eclipse-paho/paho.mqtt.python/blob/master/ChangeLog.txt)
- [Commits](eclipse-paho/paho.mqtt.python@v1.6.1...v2.1.0)

---
updated-dependencies:
- dependency-name: paho-mqtt
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the 325adependabot/pip/paho-mqtt-2.1.0 branch from 7613930 to cbca7b9 Compare January 21, 2025 04:09
@allenporter
Copy link
Contributor

allenporter commented Jan 21, 2025

OK all tests pass now. This updates the pin to be a range rather than associated 1.6. @Lash-L do you want to review and merge this and decide if you want a more specific pin or leave as is?

@Lash-L Lash-L merged commit 777b736 into main Jan 21, 2025
6 checks passed
@dependabot dependabot bot deleted the 325adependabot/pip/paho-mqtt-2.1.0 branch January 21, 2025 04:17
@Lash-L
Copy link
Collaborator

Lash-L commented Jan 21, 2025

OK all tests pass now. This updates the pin to be a range rather than associated 1.6. @Lash-L do you want to review and merge this and decide if you want a more specific pin or leave as is?

I'm fine with the range - we know it works for 1.6.0 so may as well leave as the range for now. That way the non-home assistant users don't have to update mqtt if they don't want to. If we ever add version specific functionality and we realize, we should bump it

@Lash-L
Copy link
Collaborator

Lash-L commented Jan 21, 2025

@allenporter seems like the tests sometimes fail and sometimes don't.

Maybe we should be patching the request timeout to 10 seconds so that they are less likely to fail during tests?

@allenporter
Copy link
Contributor

Hmm, some seem to be failing consistently now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants