Repository navigation
ci: single-source the Python version (.python-version) with a consistency guard - #81
Merged
Merged
Conversation
CPython 3.15.0 (2026-10-10) exposed that the Python version was hardcoded in ~17 places with no pin, so uv picked 3.15 in CI and pyarrow fell back to a failing source build. Pin it in one place — .python-version = 3.14.2 — and make everything track it: the engine Dockerfiles use the same exact patch (python:3.14.2-slim); requires-python, mypy python_version, the trove classifiers and setup-python inputs match its major.minor. A pattern-scanning guard (tests/test_python_version_consistency.py) reads .python-version and fails on any drift, discovering pyproject.toml / Dockerfile* / workflow files by directory scan so new ones are covered without editing the guard. Signed-off-by: Simone Carolini <simonecarolini.sc@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137E9XmyUXhwPTRrtNfivDw
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.
CPython 3.15.0 released 2026-10-10. The Python version was hardcoded in ~17 places with no pin, so
uv syncpicked 3.15 in CI andpyarrow==25.0.1fell back to a (failing) source build — breakingtestand allintegration-*jobs at the dependency-install step, on every branch.This makes
.python-versionthe single source of truth and enforces it:.python-version=3.14.2— the exact interpreter dev, CI and the shipped images run.Dockerfiles (postgres/trino/duckdb) +template/Dockerfile.pippin the same exact patch:FROM python:3.14.2-slim.requires-pythonfloor, mypypython_version, trove classifiers, andsetup-pythoninputs track its major.minor (3.14) — mypy andrequires-pythonreject a patch component, and keeping the host-probesetup-pythonat the minor avoids a brand-new patch missing from its manifest breaking CI; the image carries the exact patch, which is what actually ships.tests/test_python_version_consistency.py) reads.python-versionand fails on any drift. It discoverspyproject.toml/Dockerfile*/ workflow files by directory scan, so a new adapter, image or workflow is covered without editing the guard. Verified: injecting a wrong version fails the dockerfile, pyproject and workflow checks; reverting passes.To bump Python in future: edit
.python-version(and the images' slim tag), and the guard keeps the rest honest.Merge this first; the write-modes stack (#75–#80) then rebases onto
mainand inherits the pin and guard.🤖 Generated with Claude Code
https://claude.ai/code/session_0137E9XmyUXhwPTRrtNfivDw