Repository navigation
Document zero-timeout BufferedReader polling with tests - #2138
Open
Solarboaters wants to merge 1 commit into
Open
Solarboaters wants to merge 1 commit into
Solarboaters wants to merge 1 commit into
Conversation
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.
Summary of Changes
Document
BufferedReader.get_message(timeout=0)as an immediate queue poll, including FIFO draining and stopped-reader behaviour. Correct the staleBufferErrordocumentation to the actualRuntimeError. No runtime code changes or artificial minimum timeout.Related Issues / Pull Requests
Closes #1919.
Type of Change
Checklist
tox).Additional Notes
Python 3.12/Linux: all 13 listener tests pass, including three new cases. The wider suite excluding UDP multicast passes (517 tests, 107 skips, 32 deselections, 36 subtests). The full run has 20 multicast receive failures; the same 20 also fail with the original
listener.py. No physical CAN hardware was tested.Sphinx HTML builds with warnings treated as errors; changed production-file Ruff and changed-file Black checks pass. Full multi-version tox was not run. AI-assisted documentation and tests.