Skip to content

fix: Add Windows compatibility and JupyterKernelClient fallback - #99

Open
Yash-Kavaiya wants to merge 1 commit into
googlecolab:mainfrom
Yash-Kavaiya:fix-windows-compatibility-and-kernel-client
Open

fix: Add Windows compatibility and JupyterKernelClient fallback#99
Yash-Kavaiya wants to merge 1 commit into
googlecolab:mainfrom
Yash-Kavaiya:fix-windows-compatibility-and-kernel-client

Conversation

@Yash-Kavaiya

@Yash-Kavaiya Yash-Kavaiya commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #100

Summary of Fixes

This PR adds native cross-platform support for Windows and resolves a runtime AttributeError:

  1. Windows Console Compatibility (colab_cli/console.py):

    • Wrapped termios and tty imports in a try/except ImportError block.
    • Added guards around termios, tty, fileno(), and signal.SIGWINCH calls to prevent ModuleNotFoundError: No module named 'termios' on Windows.
  2. Google Drive Auth /dev/tty Fallback (colab_cli/commands/automation.py):

    • Added a fallback for open("/dev/tty") on non-POSIX systems to use sys.stdin.readline().
  3. JupyterKernelClient Fallback (colab_cli/runtime.py):

    • Fixed AttributeError: module 'jupyter_kernel_client' has no attribute 'KernelClient' in ColabRuntime.kernel_client by updating the fallback class name to jupyter_kernel_client.JupyterKernelClient.

Testing Verification

Verified end-to-end on Windows 11 with PowerShell:

  • Created sessions using colab new --gpu T4 -s demo-session
  • Handled OAuth flow & Drive automation
  • Executed Python code & GPU workloads (nvidia-smi on Tesla T4 runtime)

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.

[Bug]: Windows compatibility crashes ('termios' ModuleNotFoundError & KernelClient AttributeError)

1 participant