fix: Windows termios crash and portable Drive auth prompt - #135
Open
unn-Known1 wants to merge 2 commits into
Open
unn-Known1 wants to merge 2 commits into
unn-Known1 wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Contributor
|
Tried it out on my Windows laptop and looks pretty good! Thanks for sending this. There's some merge conflicts to resolve. Also, we've pinned the jupyter-kernel-client package for now, so I'd prefer if you removed the class changes for now to keep this PR focused on Windows support |
- console.py: guard termios/tty imports (missing on Windows) so every command no longer crashes with ModuleNotFoundError via cli -> execution -> console. Degrades to line-buffered input, guards SIGWINCH which doesn't exist on Windows. - tests: optional termios import + skip markers, graceful-degradation test.
unn-Known1
force-pushed
the
fix-windows-termios-and-kernel-client-compat
branch
from
October 1, 2026 07:26
b3bcdac to
14787f4
Compare
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
Fixes Windows crashes (scoped to Windows support per review — kernel-client part dropped, already covered by #125):
Every command crashes with
ModuleNotFoundError: No module named 'termios'src/colab_cli/console.pyimportedtermios/ttyunconditionally.cli -> commands/execution -> consolebroke evencolab new/colab --help.termios = Noneon ImportError),can_rawgate,getattr(signal, 'SIGWINCH', None)guard. Degrades to line-buffered input.needs_termiosskips,test_console_no_termios_degrades_gracefully.colab drivemountDrive auth prompt uses/dev/tty(missing on Windows)automation.py: try/dev/tty, fall back tosys.stdin.readline()/input().Rebased
upstream/main(a84e094). Droppedruntime.py+test_runtime.pychanges — superseded by fix: support PyPI jupyter-kernel-client>=1.0 (JupyterKernelClient rename) #125 + pin in Add back pin for jupyter-kernel-client #152.console.py,commands/automation.py,tests/test_console.py.Verification
uv run pytest tests/test_console.py tests/test_runtime.py -v: 16 passed (incl. new graceful-degradation test + upstream fallback test).uv run ruff check: clean.