Skip to content

chore: relax click upper bound to <9 - #388

Merged
Vitor-Avila merged 2 commits into
preset-io:mainfrom
ShadowA7X:chore/relax-click-pin
Sep 30, 2026
Merged

Vitor-Avila merged 2 commits into
preset-io:mainfrom
ShadowA7X:chore/relax-click-pin

Conversation

@ShadowA7X

Copy link
Copy Markdown
Contributor

Summary

Relax the click upper bound from <8.2 to <9.

preset-cli 0.3.10–0.3.12 declare click>=8.0.3,<8.2, while dbt-core 1.11.x requires click>=8.3.0,<9.0. The two can't be installed in the same environment, so users of both can't upgrade either one. pip install preset-cli==0.3.12 dbt-core==1.11.15 fails with ResolutionImpossible.

Why the cap was there

The cap was added in #355 because click 8.2 changed command naming: it now strips the suffixes _command, _cmd, _group and _grp from a decorated function's name. Only one test fixture depended on this, so the product code is unaffected.

Changes

  • setup.cfg: click>=8.0.3,<8.2 → click>=8.0.3,<9
  • tests/cli/superset/main_test.py: the fixture command now sets its name explicitly (@click.command(name="source-command")), so the test passes on every click version
  • dev-requirements-3.{10,11,12}.txt: click==8.1.8 → click==8.5.0, so the pinned-dependency CI job exercises the newer click
  • CHANGELOG.rst: entry added under "Next"

Testing

On Python 3.11:

  • Full test suite passes on both click 8.1.8 and 8.5.0 (708 tests, 100% coverage)
  • pre-commit run --all-files passes
  • I compared the --help output of every preset-cli and superset-cli command across click 8.1.8, 8.3.3 and 8.5.0, and it is identical. The parsed values of the delete-assets flags (including --dry-run / --no-dry-run) and of sync native are also identical, both directly and through mutate_commands
  • With this change, preset-cli installs alongside dbt-core==1.11.15 (pip resolves click 8.5.0)

I have not run the 3.10 and 3.12 jobs locally, so CI will be the first run of those.

Things to be aware of

  • Since click 8.2, running preset-cli or superset-cli with no arguments prints the help and exits with code 2 instead of 0. This is click's behavior, not something changed here.
  • Click 9.0 is not released yet. The repo's only use of an API click has deprecated for 9.0 is CliRunner.isolated_filesystem() in tests/cli/export_users_test.py. It still works on 8.x, and I left it alone to keep this PR small, so the <9 cap stays.

@CLAassistant

CLAassistant commented Sep 30, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Vitor-Avila
Vitor-Avila merged commit 5b95174 into preset-io:main Sep 30, 2026
5 checks passed
@ShadowA7X
ShadowA7X deleted the chore/relax-click-pin branch September 30, 2026 21:53
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.

3 participants