fix: add click as explicit dependency#773
Open
deuxksy wants to merge 1 commit into
Open
Conversation
typer >= 0.26.0에서 click을 core 의존성에서 제거(vendor 방식으로 전환)하여, fresh install 시 click 모듈이 없어 ModuleNotFoundError 발생. sgpt는 5개 파일에서 click을 직접 import: - sgpt/app.py: UsageError, Choice - sgpt/config.py: UsageError - sgpt/role.py: UsageError - sgpt/utils.py: BadParameter, UsageError - sgpt/handlers/chat_handler.py: BadParameter, UsageError
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
sgptcrashes withModuleNotFoundError: No module named "click"on fresh install.Root Cause
typer >= 0.26.0vendoredclickinternally and removed it from core dependencies:But
shell_gptdirectly imports fromclickin 5 files:sgpt/app.py:UsageError,Choicesgpt/config.py:UsageErrorsgpt/role.py:UsageErrorsgpt/utils.py:BadParameter,UsageErrorsgpt/handlers/chat_handler.py:BadParameter,UsageErrorFix
Add
click >= 8.0.0, < 9.0.0as an explicit dependency inpyproject.tomland regenerateuv.lock.Verification
uv lockregenerated with click 8.1.8 resolveduv run python -c "from sgpt import cli"passes