Skip to content

fix(cli): ignore broken pipe during status line cleanup#1158

Open
gaoflow wants to merge 1 commit into
canonical:mainfrom
gaoflow:fix-1150-statusline-broken-pipe
Open

fix(cli): ignore broken pipe during status line cleanup#1158
gaoflow wants to merge 1 commit into
canonical:mainfrom
gaoflow:fix-1150-statusline-broken-pipe

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 19, 2026

Copy link
Copy Markdown

Summary

  • ignore BrokenPipeError while StatusLine.stop() writes/flushed terminal cleanup output
  • always restore the wrapped print and input builtins during status line shutdown
  • add a regression test for closed stdout pipes during cleanup

Closes #1150

Tests

  • uv run pytest tests/test_status_line.py::TestStatusLineInit::test_stop_ignores_broken_pipe_and_restores_builtins -q
  • uv run pytest tests/test_status_line.py -q
  • uvx --with tox-uv tox run -e lock
  • uvx --with tox-uv tox run -e lint
  • uvx --with tox-uv tox run -e unit -- tests/test_status_line.py

Notes

  • uvx --with tox-uv tox run -e unit on this macOS machine reached 222 passed but failed two unrelated helper tests: test_is_in_snap_private_dir and test_parse_filename_snap_private. Those tests expect /tmp/job.yaml to remain under /tmp; on macOS Path.resolve() maps it under /private/tmp, so it no longer matches SNAP_PRIVATE_DIRS = ["/tmp"].

AI assistance was used under my direction.

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.

[Bug] traceback when using CTRL-C to exit a polling session

1 participant