Skip to content

fix: declare click runtime dependency#774

Open
xianzuyang9-blip wants to merge 1 commit into
TheR1D:mainfrom
xianzuyang9-blip:codex/declare-click-runtime-dependency
Open

fix: declare click runtime dependency#774
xianzuyang9-blip wants to merge 1 commit into
TheR1D:mainfrom
xianzuyang9-blip:codex/declare-click-runtime-dependency

Conversation

@xianzuyang9-blip

Copy link
Copy Markdown

Fixes #771.

shell_gpt imports Click directly from multiple modules (sgpt/app.py, sgpt/config.py, sgpt/role.py, sgpt/utils.py, and sgpt/handlers/chat_handler.py), but click is not declared as a runtime dependency. Clean installs can therefore fail before Typer's transitive dependency is available.

This adds click >= 8.1.0, < 9.0.0 as a direct project dependency.

Verification from an ASCII temp path on Windows:

  • uv run --with-editable . python -c "import importlib.metadata as m; print([r for r in (m.requires('shell_gpt') or []) if r.lower().startswith('click')])"
  • uv run --with-editable . sgpt --help
  • uv run --with-editable . python -c "from click import UsageError; import sgpt.app, sgpt.config, sgpt.role, sgpt.utils, sgpt.handlers.chat_handler; print(UsageError.__name__)"

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.

sgpt fails to start: click is imported but not declared in dependencies

1 participant