fix(setup): pin dev venv to Python 3.12 to not break setup step - #1031
fix(setup): pin dev venv to Python 3.12 to not break setup step#1031dhananjaypai08 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe project now requires Python 3.12. ChangesPython 3.12 setup enforcement
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant JustSetup as just setup
participant Python312 as Python 3.12 candidates
participant Venv as virtual environment
participant Pip as venv Python pip
Developer->>JustSetup: run setup
JustSetup->>Python312: discover and validate interpreter
Python312->>Venv: create or recreate environment
Venv->>Pip: validate and install dependencies
Pip-->>JustSetup: return setup status
JustSetup-->>Developer: complete setup or show installation guidance
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/docs/developer/setup.mdx`:
- Around line 35-40: Update the Python setup guidance in
docs/content/docs/developer/setup.mdx lines 35-40 to include the Windows
verification command using py -3.12 --version; add the Windows manual
virtual-environment command using py -3.12 -m venv venv at lines 218-219; and
update docs/content/docs/overview/troubleshooting.mdx lines 295-307 with the
Windows version check and installation guidance.
In `@justfile`:
- Around line 47-49: Update the pip validation and dependency-installation flows
in justfile at lines 47-49 and 149-153 to invoke pip through the selected {{
python }} interpreter: replace {{ pip }} --version and every subsequent {{ pip
}} installation command with {{ python }} -m pip, ensuring both validation and
installs target the same virtual environment.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f6ecc5be-0a74-43f9-9718-811fb485f6ad
📒 Files selected for processing (8)
CHANGELOG.mdCONTRIBUTING.mdREADME.mdbackend/pyproject.tomldocs/content/docs/developer/architecture.mdxdocs/content/docs/developer/setup.mdxdocs/content/docs/overview/troubleshooting.mdxjustfile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@justfile`:
- Around line 185-200: Update the PowerShell pip-install flow in setup-python to
stop immediately when any pip command fails, including the earlier installation
around line 178 and every subsequent command using “& "{{ python }}" -m pip”.
Add or reuse a small Invoke-Pip helper that checks $LASTEXITCODE after each
invocation, exits with the failure code, and prevents the success message from
being printed after an installation failure.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d7a5b797-019a-4a0c-b05b-b9f3c51d1a73
📒 Files selected for processing (3)
docs/content/docs/developer/setup.mdxdocs/content/docs/overview/troubleshooting.mdxjustfile
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/content/docs/overview/troubleshooting.mdx
- docs/content/docs/developer/setup.mdx
Summary
just setupbuilt the venv from whateverpython3resolved to, so on a 3.13/3.14machine the install failed immediately:
The venv is now pinned to 3.12, and one built on the wrong interpreter is recreated
on the next
just setupinstead of staying broken.Changes
through to the next candidate when that fails — reporting the right version isn't
enough. Debian packages
ensurepipseparately, and current Homebrewpython@3.12bottles carry a
pyexpatthat won't load on macOS 26. If none work it exits withthe install command for the platform.
run. A moved venv keeps console scripts whose shebangs point nowhere.
py -3.12launcher; installers don't create apython3.12command.requires-python = ">=3.12,<3.13"inbackend/pyproject.toml, now the singleplace the pin is explained — the justfile and docs point at it.
Testing
Exercised on macOS (arm64), where
python3is 3.14 and Homebrew'spython@3.12can't build a venv —
just setupstill completes end to end, andruff,uvicorn,numpy, numba, kokoro and misaki all load afterward. Venv handling covered for fresh,
reuse, wrong version, dead pip (a moved venv), and no 3.12 available at all, which
exits 1 with install instructions rather than leaving a half-built venv behind.
Linux shares the same bash recipe but wasn't run, and the Windows PowerShell path is
unexercised.
Summary by CodeRabbit
New Features
Documentation