Skip to content

fix: remove mix_stderr=False for click 8.2.0 compatibility#1410

Open
octo-patch wants to merge 1 commit into
simonw:mainfrom
octo-patch:fix/issue-1293-click-8-2-compatibility
Open

fix: remove mix_stderr=False for click 8.2.0 compatibility#1410
octo-patch wants to merge 1 commit into
simonw:mainfrom
octo-patch:fix/issue-1293-click-8-2-compatibility

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes #1293

Problem

CliRunner(mix_stderr=False) raises TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' with click 8.2.0, which removed this parameter. As a workaround, the project pinned click<8.2.0 in dev dependencies, but this prevents using the latest click release.

Solution

  • Remove mix_stderr=False from the two CliRunner() calls in the test suite
  • Drop the click<8.2.0 dev-dependency pin

In click 8.2.0+, stderr is always captured separately from stdout, so result.stderr continues to work correctly without the mix_stderr parameter.

Testing

Both affected tests (test_embed_multi_files_encoding and test_gpt4o_mini_sync_and_async) still check result.stderr correctly because click 8.2.0 always separates stderr from stdout by default.

…onw#1293)

The mix_stderr parameter was removed from CliRunner in click 8.2.0.
Since click 8.2.0 always captures stderr separately, remove the
now-invalid mix_stderr=False argument from CliRunner() calls and
drop the click<8.2.0 dev-dependency pin.
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.

Test failures with click 8.2.0

1 participant