Repository navigation
fix: preserve capture fixture output on thread timeouts - #212
Conversation
|
Could a maintainer review the focused thread-timeout capture fix when convenient? At The change preserves output held by No additional code change is proposed here. The implementation, validation and this follow-up used AI assistance, as disclosed in the PR. Thanks for considering the review. |
|
Following up on the October 20 review request for Could a maintainer review when convenient, or let me know if an adjustment is needed? This follow-up was prepared with AI assistance. |
|
If you want to help this issue along please re-write the original into something reasonable human-like. The current description is just way to long and difficult to parse and make sense of. |
flub
left a comment
There was a problem hiding this comment.
Please fixup the changelog. otherwise lgtm
| ----- | ||
|
|
||
| - Preserve capture-fixture output and disable fixture capturing when reporting | ||
| thread timeouts. Thanks Arham Begani. |
There was a problem hiding this comment.
Please start a new section, titled X.Y.Z. Can't add something to a previous version.
Prepared with OpenAI Codex assistance.
Keep the Python 3.15 and capture-fixture notes together under X.Y.Z, as requested in review. Prepared with OpenAI Codex assistance.
Fixes #172.
Thread timeouts can lose output buffered by capsys, capfd, capsysbinary or capfdbinary when the process exits. With --capture=no, fixture capture can also swallow the timeout diagnostics.
This flushes the active capture fixture before reading captured output, then keeps global and fixture capture disabled while reporting the timeout. The existing stack dump and exit code 1 are preserved.
Nine subprocess tests cover the four fixtures with fd capture and --capture=no, plus running without the capture plugin. They use a real timer and process exit. Upstream CI passed all ten Python 3.10–3.14 Linux/Windows jobs at commit 2252ccb.