Skip to content

fix: declare click as a dependency - #666

Open
Amine E. (aelmanaa) wants to merge 1 commit into
safe-global:mainfrom
aelmanaa:fix/declare-click-dependency
Open

Amine E. (aelmanaa) wants to merge 1 commit into
safe-global:mainfrom
aelmanaa:fix/declare-click-dependency

Conversation

@aelmanaa

Copy link
Copy Markdown

Fixes #665

Declares click>=8, which safe_cli/typer_validators.py imports directly and which typer no longer depends on since 0.26.0. uv.lock only gains the new requirement; no versions change.

I checked that safe-cli's click.ParamType parsers still work with typer 0.27.2 (which uses its own vendored click internally): with click installed, an invalid address still gets Invalid value for 'safe_address': Invalid ethereum address, and a valid one is parsed and reaches the Safe lookup.

Tests:

  • New test_click_is_a_required_dependency checks that click is a non-extra requirement of the installed package; it fails on main and passes here.
  • Full suite with ganache as in CI: 83 passed, 1 skipped on main; 84 passed, 1 skipped here.
  • pre-commit run --all-files passes.
  • A wheel built from this branch, installed without extras in a fresh venv (typer 0.27.2), runs safe-cli without the ModuleNotFoundError.

This PR was prepared with Claude Code; the checks above were run locally.

`typer_validators` imports click directly, but it was only installed as
a dependency of typer. typer 0.26.0 dropped that dependency, so a plain
`pip install safe-cli` fails with `ModuleNotFoundError: No module named
'click'` unless the `trezor` extra (which depends on click) is installed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aelmanaa
Amine E. (aelmanaa) requested a review from a team as a code owner September 29, 2026 22:16
@aelmanaa

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@aelmanaa

Copy link
Copy Markdown
Author

Uxío (@Uxio0) gentle ping on this one when you have a moment. It's a one-line dependency fix for #665 (a plain pip install safe-cli fails on import click).

The CLA check is still red only because the bot can't record signatures (details in safe-global/safe-core-sdk#1439). I signed here on Oct 15.

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.

safe-cli fails with ModuleNotFoundError: No module named 'click' on a plain install

1 participant