Skip to content

DOC: correct the .python-version claim in the contributor install guide - #2407

Merged
Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
VishnuR23:doc/python-version-pin-claim
Aug 18, 2026
Merged

DOC: correct the .python-version claim in the contributor install guide#2407
Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
VishnuR23:doc/python-version-pin-claim

Conversation

@VishnuR23

Copy link
Copy Markdown
Contributor

Description

The contributor install guide tells you the repo pins Python 3.12 via a .python-version file. There is no such file:

$ git ls-files | grep python-version      # no match
$ git log --all -- .python-version        # no history; never committed

doc/getting_started/install_local_dev.md asserts it in three places:

  • "uv will automatically download and use the correct Python version based on .python-version"
  • "The repository includes a .python-version file that pins Python 3.12."
  • "Install Python 3.12 if not already available"

What actually happens is that uv sync resolves against requires-python = ">=3.10, <3.15" and uses whatever interpreter it already has. Following this page on a clean macOS checkout gave me a 3.13.7 venv, not 3.12 — so a new contributor is told their environment is pinned when it is not, and can silently end up on a different version from the one the page describes.

For what it is worth, the # .python-version line in .gitignore is inherited from GitHub's standard Python template (it sits inside the commented # pyenv block) and is not evidence of a deliberate pin.

Changes

Replaces the claim with what the project actually guarantees:

  • states the supported range as 3.10-3.14, matching requires-python and the build_and_test.yml matrix (["3.10", "3.11", "3.12", "3.13", "3.14"])
  • notes that no interpreter is pinned and uv selects a compatible one
  • points contributors who do want a pin at uv python pin <version>, noting the resulting file is local and untracked

Happy to go the other way instead if pinning 3.12 was the actual intent — in that case the fix is to commit a .python-version file and I can swap this PR for that.

Documentation only; no code or behavior changes.

Tests and Documentation

pre-commit run --files doc/getting_started/install_local_dev.md passes, including the Validate Documentation Structure hook.

No JupyText run needed — this page is prose Markdown with no paired notebook and no executable cells.

install_local_dev.md states in three places that the repository ships a
.python-version file pinning Python 3.12. No such file is tracked and none
appears anywhere in the git history, so uv resolves against requires-python
(>=3.10, <3.15) and uses whatever interpreter it has. Following the page on a
clean macOS checkout produced a 3.13.7 venv, not 3.12.

Replace the claim with the supported range (3.10-3.14, matching requires-python
and the build_and_test matrix), note that no interpreter is pinned, and point
contributors who do want a pin at `uv python pin`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Aug 18, 2026
Merged via the queue into microsoft:main with commit 94e5a2f Aug 18, 2026
54 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.

2 participants