From a4a9990f41392a2cf9fce12b9aa6e17a08bcc5c7 Mon Sep 17 00:00:00 2001 From: Tyler Pirtle Date: Tue, 26 May 2026 22:30:05 +0000 Subject: [PATCH] fix: declare click, typing-extensions, websocket-client as deps 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. --- pyproject.toml | 3 +++ uv.lock | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b9f4421..8cf7194 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ description = "CLI for interacting with Colab." readme = "README.md" requires-python = ">=3.13" dependencies = [ + "click>=8.0", "google-auth>=2.49.1", "google-auth-oauthlib>=1.3.0", "jupyter-kernel-client", @@ -19,6 +20,8 @@ dependencies = [ "requests>=2.32.5", "rich>=14.3.3", "typer>=0.24.1", + "typing-extensions>=4.0", + "websocket-client>=1.0", ] [project.scripts] diff --git a/uv.lock b/uv.lock index 5b0c985..c509d3c 100644 --- a/uv.lock +++ b/uv.lock @@ -306,6 +306,7 @@ wheels = [ name = "google-colab-cli" source = { editable = "." } dependencies = [ + { name = "click" }, { name = "google-auth" }, { name = "google-auth-oauthlib" }, { name = "jupyter-kernel-client" }, @@ -320,6 +321,8 @@ dependencies = [ { name = "requests" }, { name = "rich" }, { name = "typer" }, + { name = "typing-extensions" }, + { name = "websocket-client" }, ] [package.dev-dependencies] @@ -329,6 +332,7 @@ dev = [ [package.metadata] requires-dist = [ + { name = "click", specifier = ">=8.0" }, { name = "google-auth", specifier = ">=2.49.1" }, { name = "google-auth-oauthlib", specifier = ">=1.3.0" }, { name = "jupyter-kernel-client", git = "https://github.com/googlecolab/jupyter-kernel-client.git" }, @@ -343,6 +347,8 @@ requires-dist = [ { name = "requests", specifier = ">=2.32.5" }, { name = "rich", specifier = ">=14.3.3" }, { name = "typer", specifier = ">=0.24.1" }, + { name = "typing-extensions", specifier = ">=4.0" }, + { name = "websocket-client", specifier = ">=1.0" }, ] [package.metadata.requires-dev]