Skip to content

Modernize deps - #36

Open
lcaiffa wants to merge 7 commits into
randomsync:masterfrom
lcaiffa:feature/modernize-deps
Open

lcaiffa wants to merge 7 commits into
randomsync:masterfrom
lcaiffa:feature/modernize-deps

Conversation

@lcaiffa

@lcaiffa lcaiffa commented Dec 25, 2025

Copy link
Copy Markdown
Contributor

I'm opening this PR to modernize the project's dependencies.
Specifically, I updated the paho-mqtt version to address the breaking changes related to the migration to version 2.
At that point, I also updated the robotframework version.
I ran all the tests as directed and verified that they all passed.
To make the tests green, I had to modify the mosquitto configuration, which in the meantime had modified some of its policies for security reasons.

@lcaiffa lcaiffa changed the title Feature/modernize deps Modernize deps Dec 26, 2025
randomsync added a commit that referenced this pull request Sep 27, 2026
* Migrate to the paho-mqtt 2 callback API

Construct mqtt.Client with keyword arguments and
CallbackAPIVersion.VERSION2, and move the callbacks to the version 2
signatures. Require paho-mqtt>=2.0,<3. CI runs the tests on paho-mqtt
2.0.0 and on the latest 2.x.

This is a mechanical port. Keyword names, arguments, error messages and
the MQTT v3.1 default of Publish Single and Publish Multiple are
unchanged. The loop redesign follows in #45.

Based on PR #36 by Luigi Caiffa.

Co-authored-by: Luigi Caiffa <luigi.caiffa@scmgroup.com>

* Require paho-mqtt 2.1, keep the protocol default an int, document the new connection error text

paho-mqtt 2.0.0's Client.protocol property recurses forever, and its
loop_stop is the only place that clears _thread. Raise the floor to 2.1
and move the CI lower-bound leg to 2.1.0.

Under paho 2, mqtt.MQTTv31 is an IntEnum, so Robot Framework 7 converted
the protocol argument of Publish Single and Publish Multiple as an enum
and passed non-member values on as strings. Default to a plain int, as
with paho 1.

Publish Single and Publish Multiple now fail with paho 2's reason text
when the broker refuses the connection. Record that in the CHANGELOG as
a breaking change.

Use ReasonCode.is_failure in the connect and disconnect callbacks, and
only add a paho-mqtt requirement in CI for the pinned leg.

---------

Co-authored-by: Luigi Caiffa <luigi.caiffa@scmgroup.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant