fix: declare click, typing-extensions, websocket-client as deps - #26
Merged
Merged
Conversation
Three first-party imports were relying on transitive dependencies that
no longer resolve cleanly when installing from PyPI:
- `click` (used by cli.py and commands/files.py) was being pulled in
by older typer versions; typer 0.25.x dropped the explicit click
dependency. With a clean `pip install google-colab-cli==0.5.4`,
uv now resolves typer==0.25.1 which does NOT install click, and
`colab version` fails immediately with
ModuleNotFoundError: No module named 'click'
- `typing_extensions` (used in commands/automation.py and others)
was pulled in transitively by typer/pydantic; same fragility.
- `websocket` (the websocket-client package; used by runtime.py via
the kernel client) was pulled in by jupyter-kernel-client; not
guaranteed.
Verified by building a wheel and installing into a fresh venv:
- Before: `colab version` -> ModuleNotFoundError: 'click'
- After: `colab version` -> prints version string cleanly.
All 198 tests still pass; ruff clean.
Discovered while validating the live 0.5.4 install on PyPI ahead of
the first OSS Exit Gate release.
wh1ter4bb1t-js
requested review from
wh1ter4bb1t-js
and removed request for
sethtroisi
May 27, 2026 16:16
wh1ter4bb1t-js
approved these changes
May 27, 2026
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.
Summary
Three first-party imports were relying on transitive dependencies that no longer resolve when installing from PyPI:
click(used bycli.pyandcommands/files.py) was being pulled in by older typer versions. typer 0.25.x dropped the explicit click dependency, so a freshpip install google-colab-cli==0.5.4resolvestyper==0.25.1which does NOT install click, andcolab versionfails immediately withModuleNotFoundError: No module named 'click'.typing_extensionswas pulled in transitively by typer/pydantic.websocket(thewebsocket-clientpackage, used byruntime.py) was pulled in byjupyter-kernel-client.All three are real first-party dependencies and should be declared.
Why now
I tested the live
0.5.4install on PyPI in a clean venv as a sanity check ahead of the first OSS Exit Gate release, andcolab versioncrashed on import. This bug exists onmaintoday as well (PR #25 only changedcloudbuild.yaml).Verification
uv pip install google-colab-cli==0.5.4(PyPI):uv run pytest tests/— 198 passeduv run ruff check .— cleanFollow-ups (not in this PR)
pytest,pytest-cov,pytest-mockare listed in runtime dependencies but should be in thedevgroup — they bloat every install with test machinery users don't need. Worth a separate cleanup PR.