Skip to content

Pin local Python to 3.11 with .python-version - #388

Merged
CodexVeritas merged 1 commit into
mainfrom
claude/python-version-uv-worktrees-8bb229
Oct 31, 2026
Merged

CodexVeritas merged 1 commit into
mainfrom
claude/python-version-uv-worktrees-8bb229

Conversation

@CodexVeritas

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a .python-version file containing 3.11, so uv sync in a fresh checkout or worktree uses Python 3.11 instead of the newest uv-managed Python (3.14), where some unit tests fail.
  • The pin is minor-level (3.11, not a patch version), so any installed 3.11.x satisfies it. pyenv reads the same file and resolves 3.11 to the latest installed 3.11.x.
  • 3.11 matches requires-python, the dev container base image, and the bot-running workflows.

CI impact

None. The workflows pass an explicit python-version to setup-uv (which sets UV_PYTHON and takes precedence over .python-version), and the pre-commit workflow passes an explicit version to setup-python. Unit-test CI keeps running on 3.12.3.

Testing

  • Fresh worktree before this change: uv sync --all-extras --dry-run reports CPython 3.14.
  • Fresh worktree with this change: reports CPython 3.11; a full uv sync --all-extras followed by the unit test suite (TZ=UTC) gives 1032 passed, 141 skipped, 0 failed.
  • An existing 3.11 .venv is reused, not rebuilt.

🤖 Generated with Claude Code

uv otherwise picks the newest managed Python (3.14) in a fresh checkout,
where some unit tests fail. CI is unaffected: the workflows pass an
explicit python-version to setup-uv, which takes precedence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CodexVeritas
CodexVeritas merged commit a54dd64 into main Oct 31, 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