Skip to content

Upgrade Click and ufmt - #574

Open
HayaoSuzuki wants to merge 1 commit into
Instagram:mainfrom
HayaoSuzuki:upgrade-click-ufmt
Open

Upgrade Click and ufmt#574
HayaoSuzuki wants to merge 1 commit into
Instagram:mainfrom
HayaoSuzuki:upgrade-click-ufmt

Conversation

@HayaoSuzuki

Copy link
Copy Markdown

Summary

  • Raise the Click requirement from >=8.0,<8.2 to >=8.3.3,<9 to address PYSEC-2026-2132.
  • Update ufmt from 2.8.0 to 2.9.1.
  • Click 8.2 removed the mix_stderr parameter from CliRunner and changed Result.output to mix stdout and stderr. Use CliRunner() and assert against Result.stdout in the CLI tests.
  • Click 8.2 also changed how groups handle no arguments, which would cause fixit to exit 2 and write help to stderr. Preserve Fixit's existing behavior, in which fixit prints help to stdout and exits 0 while option-only invocations still report a missing command.
  • Fixes Out-of-date click dependency has an attached CVE #570
  • Unblocks Bump ufmt from 2.8.0 to 2.9.1 #565

Test Plan

  • Python 3.10.20 with Click 8.3.3 and ufmt 2.9.1: 391 tests passed.
  • Python 3.12.6 with Click 8.5.0 and ufmt 2.9.1: 391 tests passed.
  • pyrefly check -c pyproject.toml
  • python -m flake8 src/fixit/ scripts/
  • python -m fixit lint src/fixit/ scripts/
  • python scripts/check_copyright.py
  • python -m build
  • Sphinx HTML build
  • make lint stops at python -m ufmt check, which reports the same 27 paths on this branch and origin/main with Black 26.3.1 from Bump black #560. Flake8, Fixit lint, and the copyright check pass.

Require Click 8.3.3 or newer to address PYSEC-2026-2132, and update ufmt to 2.9.1. Adapt the CLI tests to Click's separate stdout and stderr streams. Preserve Fixit's no-argument help behavior after Click 8.2 changed the default exit status and stream.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Out-of-date click dependency has an attached CVE

1 participant