Skip to content

fix: make CLI reports pipe-friendly and export public errors - #59

Merged
cocolato merged 2 commits into
mainfrom
fix/report-output
Oct 18, 2026
Merged

cocolato merged 2 commits into
mainfrom
fix/report-output

Conversation

@cocolato

@cocolato cocolato commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

--print currently writes the requested report to stderr, leaving a pipe or redirected stdout empty. Write traceback and exception text to stdout, keep omission notices on stderr, and preserve text supported by the stream's error handler while escaping unencodable characters. A closed stdout pipe exits quietly with status 141; a closed notice pipe does not suppress the report.

Also export DumpFormatError, CaptureTimeoutError, and CaptureInterruptedError from the package root and update the matching API documentation and bilingual usage notes.

Refs #58. First PR in a three-part series; base: main.

Validation on CPython 3.13.15:

  • Full suite: 122 passed, 1 skipped (native PID capture requires Python 3.14+).
  • Coverage: 88.52%, above the 85% gate.
  • Ruff lint/format checks, git diff --check, and strict Sphinx build passed.
  • Package-root error exports were checked against the defining module types.

The pipe tests run real subprocesses. Encoding tests explicitly disable newline translation so byte-level assertions are portable to Windows.

CI on the latest head: all 10 checks passed, covering Linux Python 3.11–3.15, Windows/macOS Python 3.14, quality, documentation, and distributions. Workflow run.

@cocolato
cocolato merged commit ac586fa into main Oct 18, 2026
10 checks passed
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