Repository navigation
deps: require ebus-mqtt-client 0.4.0 and document the loop-native transport - #29
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #28 (base is
ha-customizer-soc-capability, so it merges after that one; both touchCHANGELOG.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.mdnamed that constraint ("a host like Home Assistant... forbids background threads") without being able to point at an answer.ebus-mqtt-client0.4.0 adds one.MqttClient.asyncio_driver()pumps the network loop on the caller's asyncio loop (paho socket hooks plus a periodicloop_misc) instead of paho's thread, mutually exclusive withstart()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.0from PyPI: 547 passed, no changes needed.ruff checkandruff format --checkclean.🤖 Generated with Claude Code