Skip to content

Flush sys.stderr when CliRunner finalizes#2933

Merged
davidism merged 1 commit into
pallets:stablefrom
sirosen:clirunner-flushes-stderr
May 20, 2025
Merged

Flush sys.stderr when CliRunner finalizes#2933
davidism merged 1 commit into
pallets:stablefrom
sirosen:clirunner-flushes-stderr

Conversation

@sirosen
Copy link
Copy Markdown
Contributor

@sirosen sirosen commented May 20, 2025

Add a dedicated finalizer for CliRunner streams to collect up these values, which makes the scope of the finally block easy to read and reason about.

closes #2682

@davidism davidism added this to the 8.2.1 milestone May 20, 2025
@davidism davidism force-pushed the clirunner-flushes-stderr branch from 8018638 to 44c5bbc Compare May 20, 2025 22:12
@davidism davidism changed the base branch from main to stable May 20, 2025 22:13
@davidism davidism force-pushed the clirunner-flushes-stderr branch from 44c5bbc to f3a4363 Compare May 20, 2025 22:14
@davidism
Copy link
Copy Markdown
Member

After some review, I think it's better to leave it in the finally block for now, so I've updated the PR. Rebased to stable and added a change entry.

@davidism davidism merged commit cfa6f4a into pallets:stable May 20, 2025
10 checks passed
@sirosen sirosen deleted the clirunner-flushes-stderr branch May 21, 2025 03:57
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 5, 2025
@kdeldycke kdeldycke changed the title Flush sys.stderr when CliRunner finalizes Flush sys.stderr when CliRunner finalizes Apr 29, 2026
@kdeldycke kdeldycke added bug f:test runner feature: cli test runner labels Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug f:test runner feature: cli test runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisiting stderr flush in CLIRunner

3 participants