From 4906ea29b01684e126693bd498a8633ec92254b5 Mon Sep 17 00:00:00 2001 From: Donald Clark Jackson Date: Fri, 21 Aug 2026 22:18:08 -0700 Subject: [PATCH] deps: floor ebus-mqtt-client at 0.5.0 0.5.0 holds retained QoS 0 publishes issued before the link is up and flushes them on connect, and stops warning about each one. That window is one the SDK creates by design rather than an edge case: a root built with mqtt_cfg= connects asynchronously, so a construction-time state_transition can publish before CONNACK. building-a-proxy.md already documents the consequence and tells a producer to wait for is_connected(), but the default path provokes it. At the SDK's default QoS 2 paho already queued those publishes, so what changes there is the warning burst: 3 per boot to 0, measured on a Gen3 lab panel. At QoS 0 it is the difference between those retained publishes arriving and being dropped. Honest about what this floor is: nothing in the SDK imports or requires anything new, and the full suite passes against 0.4.0. It is the same kind of floor as 0.4.0's, which the comment already describes as "the SDK does not import it, but a consumer following that guidance needs it present". It also aligns with meta-span's python3-ebus-sdk recipe, which already floors at 0.5.0 on the device side, so a dev install and a panel now behave the same. No release cut for this; it rides with the next one. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 2 +- pyproject.toml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d23a028..169b449 100644 --- a/README.md +++ b/README.md @@ -360,7 +360,7 @@ See [`examples/README.md`](examples/README.md) for example scripts demonstrating ## Requirements - Python 3.10+ -- [`ebus-mqtt-client`](https://github.com/electrification-bus/ebus-mqtt-client) >= 0.4.0 (the MQTT transport layer; it pins `paho-mqtt`, so the SDK does not depend on paho directly. 0.4.0 provides `MqttClient.asyncio_driver()`, the loop-native alternative to paho's background thread; 0.3.0 ships the `py.typed` marker, so a downstream type checker resolves the re-exported `MqttClient` to the concrete class rather than `Any`; 0.2.0 adds the `on_disconnect_callback` the SDK's disconnect hook adopts; and, since 0.1.8, it carries the asynchronous, down-broker-tolerant connect the resilient-connect behavior relies on) +- [`ebus-mqtt-client`](https://github.com/electrification-bus/ebus-mqtt-client) >= 0.5.0 (the MQTT transport layer; it pins `paho-mqtt`, so the SDK does not depend on paho directly. 0.5.0 holds retained QoS 0 publishes issued before the link is up and flushes them on connect, rather than dropping them and warning about each: a root built with `mqtt_cfg=` connects asynchronously, so the SDK itself creates that window whenever a construction-time `state_transition()` publishes before CONNACK; 0.4.0 provides `MqttClient.asyncio_driver()`, the loop-native alternative to paho's background thread; 0.3.0 ships the `py.typed` marker, so a downstream type checker resolves the re-exported `MqttClient` to the concrete class rather than `Any`; 0.2.0 adds the `on_disconnect_callback` the SDK's disconnect hook adopts; and, since 0.1.8, it carries the asynchronous, down-broker-tolerant connect the resilient-connect behavior relies on) Optional extras: diff --git a/pyproject.toml b/pyproject.toml index f854e1a..41e487a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,15 @@ classifiers = [ dependencies = [ # MQTT transport lives in ebus-mqtt-client, which pins paho-mqtt; the SDK # does not import paho directly, so paho is a transitive dependency (not - # declared here). Floor 0.4.0: it adds the loop-native AsyncioMqttDriver + # declared here). Floor 0.5.0: it holds retained QoS 0 publishes issued + # before the link is up and flushes them on connect, and stops warning about + # each one. That window is one the SDK creates by design, not an edge case: a + # root built with mqtt_cfg= connects asynchronously, so a construction-time + # state_transition can publish before CONNACK. At the default QoS 2 paho + # already queued those, so what 0.5.0 changes there is the warning burst (3 + # per boot to 0, measured on a Gen3 panel); at QoS 0 it is the difference + # between those retained publishes arriving and being dropped. Earlier + # floors, still relied on: 0.4.0 adds the loop-native AsyncioMqttDriver # (MqttClient.asyncio_driver()), which the bring-your-own-transport section of # the README now documents as the answer for a host that forbids paho's # background thread; the SDK does not import it, but a consumer following that @@ -42,7 +50,7 @@ dependencies = [ # on_disconnect_callback the disconnect hook adopts (SDK-al5); 0.1.8 added the # connect_async construction the resilient-connect behavior relies on (older # clients raised ConnectionRefusedError on a down broker). - "ebus-mqtt-client>=0.4.0", + "ebus-mqtt-client>=0.5.0", ] [project.optional-dependencies]