Chore(deps-dev): Update aiomqtt requirement from <=0.1.3 to <=2.4.0#246
Chore(deps-dev): Update aiomqtt requirement from <=0.1.3 to <=2.4.0#246dependabot[bot] wants to merge 1 commit intomainaleph-im/aleph-sdk-python:mainfrom dependabot/pip/aiomqtt-lte-2.4.0aleph-im/aleph-sdk-python:dependabot/pip/aiomqtt-lte-2.4.0Copy head branch name to clipboard
Conversation
Updates the requirements on [aiomqtt](https://github.com/empicano/aiomqtt) to permit the latest version. - [Release notes](https://github.com/empicano/aiomqtt/releases) - [Changelog](https://github.com/empicano/aiomqtt/blob/main/CHANGELOG.md) - [Commits](empicano/aiomqtt@v0.1.0...v2.4.0) --- updated-dependencies: - dependency-name: aiomqtt dependency-version: 2.4.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
|
Failed to retrieve llama text: Invalid URL '/completion': No scheme supplied. Perhaps you meant https:///completion? |
foxpatch-aleph
left a comment
There was a problem hiding this comment.
The PR bumps aiomqtt from <=0.1.3 to <=2.4.0, but aiomqtt v2.x introduced a completely redesigned async-first API that is incompatible with the existing usage in examples/mqtt.py. The example still uses the old paho-mqtt-style callback API (on_connect, on_disconnect, on_message, loop_forever, client.connect, client.reconnect) which no longer exists in aiomqtt 2.x. Allowing the new version without updating the example will result in runtime errors for anyone using that example. The constraint should either be kept at <=0.1.3 until the example is updated, or the example must be rewritten to use the async context manager / message iterator pattern introduced in aiomqtt 1.x+.
examples/mqtt.py (line 86): This line uses the old aiomqtt 0.x constructor signature (aiomqtt.Client(loop, userdata=userdata, transport=transport)). In aiomqtt 2.x the client is used as an async context manager (async with aiomqtt.Client(hostname, ...) as client:) and the loop and userdata parameters no longer exist. This will raise a TypeError at runtime with the newly allowed version.
examples/mqtt.py (line 87): The callback-based API (client.on_connect, client.on_disconnect, client.on_message) was removed in aiomqtt 1.x. Messages are now consumed via async for message in client.messages:. These three lines will silently do nothing or raise AttributeError.
examples/mqtt.py (line 96): client.loop_forever() does not exist in aiomqtt 2.x. The event loop integration is handled internally by the async context manager.
examples/mqtt.py (line 98): await client.connect(host, port, keepalive) was removed; connection is established by entering the async context manager (async with aiomqtt.Client(hostname=host, port=port, keepalive=keepalive) as client:).
examples/mqtt.py (line 102): await client.reconnect() no longer exists in aiomqtt 2.x. Reconnection logic must be implemented by re-entering the context manager, typically in a retry loop.
pyproject.toml (line 69): The jump from <=0.1.3 to <=2.4.0 crosses two major version boundaries with breaking API changes. If the intent is to keep backward compatibility while allowing a patch/minor bump, the constraint should be tightened (e.g. >=2.0,<=2.4.0) once the example is updated. As written, it also still allows the old 0.1.3 version due to the <= bound starting from whatever was previously installed.
foxpatch-aleph
left a comment
There was a problem hiding this comment.
This PR updates the aiomqtt version constraint from <=0.1.3 to <=2.4.0, which is a major version jump spanning two breaking API rewrites. The aiomqtt library underwent a complete redesign between v0.x and v2.x: it moved from a paho-mqtt callback-based wrapper to a fully async context manager API. The existing examples/mqtt.py uses the old v0.x API (passing loop and userdata to the constructor, assigning on_connect/on_disconnect/on_message callbacks, calling client.connect(), client.loop_forever(), and client.reconnect() directly), all of which are absent in v2.x. Allowing <=2.4.0 means pip will resolve to v2.4.0 by default, breaking the example entirely. The example should be updated to the new async API, or the constraint should target a specific compatible range.
examples/mqtt.py (line 86): This file uses the aiomqtt v0.x API, which is completely incompatible with v2.x. aiomqtt.Client no longer accepts a loop or userdata argument — the constructor now only takes connection parameters (hostname, port, etc.). The callback-based pattern (client.on_connect, client.on_message, etc.) was removed; the v2.x API uses async with aiomqtt.Client(...) as client: and async for message in client.messages: instead. Methods like client.connect(), client.loop_forever(), and client.reconnect() no longer exist as standalone calls. This example will fail at runtime with any version of aiomqtt >= 1.0.
pyproject.toml (line 69): Changing the upper bound from <=0.1.3 to <=2.4.0 effectively causes pip to install v2.4.0 by default, which has a completely different public API. If the intent is to support the new API, examples/mqtt.py must be rewritten to match. If the intent is only to keep the dependency up-to-date without breaking changes, consider pinning to the v0.x line with >=0.1.3,<1.0 or rewriting the example alongside the version bump.
Updates the requirements on aiomqtt to permit the latest version.
Release notes
Sourced from aiomqtt's releases.
Changelog
Sourced from aiomqtt's changelog.
... (truncated)
Commits
afe9978docs: Update CHANGELOG for releaseafa0dbfAdd proxy port8d75a54Fix retained message delay on TLS5b7d564test: Open websockets port on local development9a8c5a4refactor: Adapt to new ruff rulesdeb950dbuild: Bump ruff to latest version04fa87cdocs: Update CHANGELOG for release3b31f11fix: Add outdated version attributes after uv switch894f367docs: Add missing Python version markers after uv switch3d1ceeabuild: Test for Python 3.13Dependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)