Skip to content

0.7.2 regression: jupyter-kernel-client==0.8 pin (#121) breaks colab exec on PyPI installs (JupyterSubprotocol) #137

Closed

Description

@firaen22

Summary

The jupyter-kernel-client==0.8 pin from #121 shipped in 0.7.2, and on a PyPI install it breaks every colab exec:

AttributeError: module 'jupyter_kernel_client' has no attribute 'JupyterSubprotocol'

colab new, stop, sessions and usage still work; only kernel execution fails.

This is the failure @crichalchemist predicted in #94 (comment) (the "Second failure mode" section of their 2026-09-08 comment). Their root-cause analysis is correct and I won't repeat it. In short, [tool.uv.sources] isn't in the wheel metadata, so ==0.8 resolves to PyPI's 0.8.0 instead of the fork, and PyPI's 0.8.0 doesn't export JupyterSubprotocol. This issue just confirms that the released package is affected.

Reproduce

uv tool install google-colab-cli==0.7.2
colab new -s t          # Session READY (CPU)
echo "print(1)" | colab exec -s t
# -> AttributeError: module 'jupyter_kernel_client' has no attribute 'JupyterSubprotocol'
colab stop -s t

The published wheel's metadata has only Requires-Dist: jupyter-kernel-client==0.8.

Workaround (verified)

echo "jupyter-kernel-client==0.9.0" > overrides.txt
uv tool install --reinstall --overrides overrides.txt google-colab-cli==0.7.2

With it, a CPU runtime ran new → exec (prints output) → stop with no errors.

Suggested fix

Replace the pin with >=0.9 plus an upper bound that matches the client-class lookup in runtime.py, as measured in #94.

Environment

google-colab-cli 0.7.2 (PyPI), installed with uv tool install, macOS.

Activity

  1. crichalchemist commented on Sep 23, 2026

    @crichalchemist

    Thanks for confirming this against the released wheel. I reproduced it live today on current main (e25c265): I built the wheel, installed it in isolated venvs with no mocks, and ran colab exec against one CPU runtime:

    jupyter-kernel-client client class used live colab exec
    0.8.0 (PyPI) KernelClient ❌ AttributeError: ... 'JupyterSubprotocol'
    0.9.0 KernelClient ✅
    0.11.0 ColabKernelClient ✅
    0.15.0 ColabKernelClient ✅
    1.0.0 ColabKernelClient ✅
    1.0.2 — ❌ AttributeError: ... 'KernelClient' (#94, addressed by #125)
    googlecolab fork (dev uv.lock) KernelClient ✅

    This isn't a uv-vs-pip issue. It affects every install from PyPI, whatever the installer: the built wheel's metadata carries only Requires-Dist: jupyter-kernel-client==0.8, and fresh uv tool install google-colab-cli==0.7.2 and pip install google-colab-cli==0.7.2 both resolve PyPI's 0.8.0. The [tool.uv.sources] override that points at the googlecolab fork only applies when uv installs from a source checkout (uv sync / uv run in the repo). That's why it doesn't reproduce in the dev environment.

    #138 has the fix. I left a review there suggesting the floor be 0.9 rather than 0.8: with a 0.8 floor, pip install --upgrade from 0.7.2 keeps jkc at 0.8.0, so pip users stay broken after upgrading. uv-tool installs like yours are fixed either way.

    Not verified live: colab auth / colab drivemount on the ColabKernelClient path (0.11–1.0.0), since they're interactive. Statically it's a thin subclass sending the same proxy-token header and query param, with stdin/input_reply handling identical to the fork's.

  2. bkowshik commented on Sep 24, 2026

    @bkowshik

    Independent confirmation on macOS arm64 (Python 3.14, uv tool install). The install upgraded to 0.7.2 on 2026-09-24, and every colab exec then failed with the JupyterSubprotocol error. Only the kernel commands break; new, sessions and stop still work. Because the colab new post-hook runs exec, that also broke our session bootstrap.

  3. palindromeRice commented on Sep 25, 2026

    @palindromeRice

    Confirmed on macOS with google-colab-cli 0.7.2 installed via uv tool. colab drivemount fails with:

    AttributeError: module 'jupyter_kernel_client' has no attribute 'JupyterSubprotocol'
    

    The PyPI release of jupyter-kernel-client 0.8.0 does not export JupyterSubprotocol; 0.9.0, 1.0.0 and 1.0.2 do. Workaround until #138 lands:

    echo "jupyter-kernel-client==0.9.0" > overrides.txt
    uv tool install --force --overrides overrides.txt google-colab-cli

    This resolves the AttributeError.

  4. sethtroisi commented on Sep 26, 2026

    @sethtroisi
    Collaborator

    Thanks for the write up! I think this is now fixed after a flurry of changes today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions