You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: replace invalid UTF-8 without losing subprocess output - #208
An invalid UTF-8 byte stops the background stdout or stderr reader, losing the rest of that stream's captured output. Decode with replacement so both streams continue to be captured and displayed.
Real child-process tests cover invalid bytes followed by valid UTF-8 and later lines on both streams, normal/quiet/disabled tee output, and captured output on a nonzero exit with check=True. The four cases fail on current main and pass with the fix. Update the expected test count from 18 to 22 for these four added cases.
Validation: full Python 3.12 tox suite passes with 22 passed, 1 existing XPASS, and 81% coverage, including the Molecule/Ansible localhost scenario. Build, strict Twine validation and strict documentation build pass. Formatting, Ruff, Pyright, Pylint and spelling checks pass. The Mypy pre-commit hook fails identically on clean main because its unpinned pytest dependency uses Python 3.10 syntax while the configured target is 3.9; the same Mypy version passes the changed files with the repository's locked pytest 8.4. No native Windows or macOS run.
Label error. Requires at least 1 of: breaking, chore, feat, fix. Found: . Follow https://www.conventionalcommits.org to get auto-labeling to work correctly.
omrzk
changed the title
Replace invalid UTF-8 without losing subprocess output
fix: replace invalid UTF-8 without losing subprocess output
Nov 9, 2026
The title now uses fix:. The ack workflow only handles opened/labeled/unlabeled/synchronize events, so applying the fix label still needs a maintainer; I don't have triage permission here.
The other current failures are separate from that metadata correction: tox fails while building coactions/dynamic-matrix@v4, before this repository is checked out (cffi==1.17.1 under Python 3.15). Pre-commit CI reports the same pytest 9/Python 3.9-target Mypy syntax error reproduced on clean main and disclosed in the description. The local Python 3.12 tox run remains 22 passed, 1 existing XPASS; the code tree is unchanged.
This branch has not been deployed
No deployments
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
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.
An invalid UTF-8 byte stops the background stdout or stderr reader, losing the rest of that stream's captured output. Decode with replacement so both streams continue to be captured and displayed.
Fixes #134.
Real child-process tests cover invalid bytes followed by valid UTF-8 and later lines on both streams, normal/quiet/disabled tee output, and captured output on a nonzero exit with
check=True. The four cases fail on current main and pass with the fix. Update the expected test count from 18 to 22 for these four added cases.Validation: full Python 3.12 tox suite passes with 22 passed, 1 existing XPASS, and 81% coverage, including the Molecule/Ansible localhost scenario. Build, strict Twine validation and strict documentation build pass. Formatting, Ruff, Pyright, Pylint and spelling checks pass. The Mypy pre-commit hook fails identically on clean main because its unpinned pytest dependency uses Python 3.10 syntax while the configured target is 3.9; the same Mypy version passes the changed files with the repository's locked pytest 8.4. No native Windows or macOS run.