Repository navigation
Cover the sync-via-async client paths (#3088 follow-up) - #3090
Merged
janiversen merged 1 commit intoNov 17, 2026
Merged
Conversation
Test a sync tcp client without an async counterpart: connect() raises TypeError and close() still stops the private loop. This covers the raise in _create_async_client() and the branch in _close_async() with a loop thread but no async client, so the temporary pragmas from a0af0f0 are removed.
janiversen
approved these changes
Nov 17, 2026
janiversen
left a comment
Collaborator
There was a problem hiding this comment.
We are just humans, thanks for solving it rapidly.
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.
Follow-up to #3088, which merged with 2 gaps in coverage. Sorry for missing the CI error
./check_ci.shondevshowed:pymodbus/client/base.pyline 278: theraise TypeErrorin_create_async_client(), for a client without an async counterpart_close_async(): a loop thread without an async client. That is the state_connect_async()leaves when_create_async_client()raisestest_no_async_counterpartintest/client/test_client_sync_loop.pycovers both. It sets_async_client_factorytoNone, checks thatconnect()raisesTypeError, and thatclose()then stops the private loop (nopymodbus-sync-clientthread left). The temporary# pragma: no coverlines from a0af0f0 are removedValidation
./check_ci.shpasses locally (codespell, ruff, pylint, zuban,pytest -x --cov --numprocesses auto): 2024 passed, 7 skipped, total coverage 100.00%AI disclosure: written with an AI coding agent and tested as described above