Skip to content

deps: require ebus-mqtt-client 0.4.0 and document the loop-native transport - #29

Merged
dcj merged 1 commit into
ha-customizer-soc-capabilityfrom
transport-floor-0-4-0
Aug 5, 2026
Merged

dcj merged 1 commit into
ha-customizer-soc-capabilityfrom
transport-floor-0-4-0

Conversation

@dcj

@dcj dcj commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Stacked on #28 (base is ha-customizer-soc-capability, so it merges after that one; both touch CHANGELOG.md).

The bring-your-own-transport seam answers WHICH connection a producer publishes through, but paho's network loop still has to be pumped somewhere, and by default that is a background thread: the exact thing the seam's motivating host forbids. README.md named that constraint ("a host like Home Assistant... forbids background threads") without being able to point at an answer.

ebus-mqtt-client 0.4.0 adds one. MqttClient.asyncio_driver() pumps the network loop on the caller's asyncio loop (paho socket hooks plus a periodic loop_misc) instead of paho's thread, mutually exclusive with start() per client. This documents it in the bring-your-own-transport section with a worked snippet and raises the floor accordingly.

On the floor bump

The SDK does not import the driver and needs nothing from 0.4.0 at runtime. The floor rises because a consumer following the newly documented guidance needs it present, not because the SDK's own code does. Bumping a floor narrows consumers, so it should not happen just because a new version exists; pairing it with the doc that makes it necessary is the justification.

The driver module loads lazily and imports only the standard library plus paho, so a thread-mode consumer (or a constrained build such as a Yocto image) never loads it.

Verification

Full suite run in an isolated venv against ebus-mqtt-client==0.4.0 from PyPI: 547 passed, no changes needed. ruff check and ruff format --check clean.

🤖 Generated with Claude Code

…nsport

The bring-your-own-transport seam answers WHICH connection a producer
publishes through, but paho's network loop still has to be pumped somewhere,
and by default that is a background thread: the exact thing the seam's
motivating host forbids. README.md named that constraint ("a host like Home
Assistant ... forbids background threads") without being able to point at an
answer.

ebus-mqtt-client 0.4.0 adds one: MqttClient.asyncio_driver() pumps the network
loop on the caller's asyncio loop (paho socket hooks plus a periodic
loop_misc) instead of paho's thread, mutually exclusive with start() per
client. Document it in the bring-your-own-transport section with a worked
snippet, and raise the floor accordingly.

The SDK does not import the driver and needs nothing from 0.4.0 at runtime:
the full suite passes unchanged against it (verified in an isolated venv). The
floor rises because a consumer following the documented guidance needs it
present, not because the SDK's own code does. The driver module loads lazily
and imports only the standard library plus paho, so a thread-mode consumer or
a constrained build never loads it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@dcj
dcj merged commit cf6a4c7 into ha-customizer-soc-capability Aug 5, 2026
5 checks passed
@dcj
dcj deleted the transport-floor-0-4-0 branch August 5, 2026 22:44
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