Skip to content

Make the course work on Windows, and test it there - #38

Merged
thejesh23 merged 10 commits into
mainfrom
windows-support
Nov 22, 2026
Merged

thejesh23 merged 10 commits into
mainfrom
windows-support

Conversation

@thejesh23

@thejesh23 thejesh23 commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Windows learners follow the course in Git Bash (Lesson 03). Until now nothing had run there: CI ran only on Linux. This adds a Windows CI job and fixes what it found.

New: Windows CI job (windows-latest, Git Bash, the setup Windows learners have)

  • runs the full test suite and every runnable lesson command
  • types py wherever a lesson says python3, exactly as Lesson 03 tells Windows learners (python.org's installer has no python3)

Bugs found and fixed

  • Exercise 3 checker crashed on Windows (Lesson 10): Python before 3.15 writes to Git Bash in the cp1252 code page, and ✘ raised UnicodeEncodeError. Reproduced locally, then fixed: learner-run tools now print UTF-8. find_issues.py (★) had the same problem. A test runs the tools with a cp1252 pipe.
  • Conflict lab crashed on Windows (Lesson 11): git's object files are read-only, and Windows refuses to delete them, so setup failed with "Access is denied". Found by the Windows run.
  • Tools read and write learner files as UTF-8, not the Windows default.
  • which_setup.py now prints py -m venv .venv and source .venv/Scripts/activate on Windows.
  • Lessons 07 and A give the Windows venv commands next to the macOS/Linux ones, as Lesson 05 already did.
  • Test infrastructure: run Git Bash rather than WSL's bash (which Windows finds first), skip the macOS-only say lock test, write test files as UTF-8.

Result: 241 tests pass on Linux, Windows and macOS (local), and the lesson commands pass in Git Bash on Windows. No video changes: the videos say python3, and Lesson 03 already tells Windows learners to type py.

🤖 Generated with Claude Code

thejesh23 and others added 10 commits November 22, 2026 02:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Windows defaults to cp1252, so any non-English character in a learner's
file could break the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Git Bash, Python before 3.15 writes to a pipe in the system code page
and stops with UnicodeEncodeError on ✔. tools/doctor.py is the first
thing a Windows learner runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
which_setup.py prints py and .venv/Scripts/activate on Windows; lessons 07
and A now give the Windows commands next to the macOS/Linux ones, like
lesson 05 does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
git's object files are read-only, and Windows refuses to delete read-only
files, so setting up the lab crashed with 'Access is denied' (Lesson 11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows a bare 'bash' resolves to System32\bash.exe (WSL) before
anything on PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lesson 03 tells Windows learners to type py wherever a lesson says
python3; python.org's installer doesn't provide python3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thejesh23
thejesh23 marked this pull request as ready for review November 22, 2026 11:00
@thejesh23
thejesh23 merged commit 792ae29 into main Nov 22, 2026
2 checks passed
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.

1 participant