Repository navigation
ci: run each job on the Python version it names - #160
Merged
Merged
Conversation
setup-python installed the matrix interpreter, but uv takes its version from .python-version (3.10), not from the interpreter on PATH, so test (3.11), test (3.12) and the live suite, set up on 3.12, all ran on 3.10. The release gate calls this workflow, so it had the same gap (#156). setup-uv's python-version input exports UV_PYTHON, which uv sync, uv pip and uv run all prefer to .python-version. Passing --python to uv sync alone would not hold: the bare uv run that follows recreates the environment on the version .python-version names. Lint and the release build set up 3.12 and ran on 3.10 the same way, so they get the same input. .python-version stays 3.10.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 62 62
Lines 3196 3196
=========================================
Hits 3196 3196
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Ready — Code reviewThis CI-only change makes uv use each job's declared Python version in test, lint, integration, and build workflows. Version impact: none; no public SDK symbols or runtime package behavior change. Rating patch 6/6 (exemplary) · proof 6/6 (comprehensive) · overall 6/6 Reviewed |
MarketDataDev01
approved these changes
Oct 2, 2026
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.
What happened
test (3.11),test (3.12)andIntegration Tests (live)installed their Python withactions/setup-python, and thenuv sync --group devbuilt.venvon the 3.10 that.python-versionnames, downloading a managed 3.10.21 because the runner had none onPATH. pytest ran on 3.10.21 in all four jobs, so the matrix tested one version three times. The release gate oftag-and-releaseandpublish.ymlcalls this workflow, so it had the same gap. From 3.11 on the lock installs numpy 2.3.5 instead of 2.2.6, and CI had never run it.Lint, andbuild.yml, which both release workflows call, set up 3.12 and ran uv on 3.10 by the same rule. Nothing they produce changed: ruff is a standalone binary that targets py310 frompyproject.toml, and the wheel ispy3-none-any.The change
python-versiononastral-sh/setup-uvin every job that builds a uv environment: the matrix version intest, and"3.12"in the live job, inLintand inbuild.yml, the version each one already sets up. The input exportsUV_PYTHONfor the later steps, anduv sync,uv pipanduv runall take it over.python-version.Of the three ways to do it, this is the smallest: one line per job, and it covers every uv command in the job.
uv sync --python Xalone would not hold, because the bareuv run pytestthat follows recreates.venvon the version.python-versionnames. Measured locally, on an environment thatuv sync --python 3.11had just built:A job-level
UV_PYTHONenv does the same as the input, with one more line in the matrix job.actions/setup-pythonstays: uv now uses the interpreter it installs instead of downloading one, andbuild.ymlrunspythonfrom it..python-versionstays 3.10. The job names and theTests passedgate do not change. One CHANGELOG entry under Fixed.Proof
Before: main run 36139219264 (bc0619c) for the matrix. A push to main does not run the live suite, so its before is job 108175285786 of run 36166436477, on the branch of #159, whose
test.ymlis main's. After: run 36484944941, aworkflow_dispatchofTestson this branch (b057347).test (3.10)Python 3.10.21Set UV_PYTHON to 3.10, uses itPython 3.10.21test (3.11)Python 3.10.21Set UV_PYTHON to 3.11, uses itPython 3.11.16test (3.12)Python 3.10.21Set UV_PYTHON to 3.12, uses itPython 3.12.14Integration Tests (live)Python 3.10.21Set UV_PYTHON to 3.12, uses itPython 3.12.14"uses it" is the log line
Using CPython 3.1x.y interpreter at: /opt/hostedtoolcache/Python/3.1x.y/x64/bin/python3.1x, the interpreter setup-python installed. "downloads" isDownloading cpython-3.10.21-linux-x86_64-gnufollowed byUsing CPython 3.10.21. No job of the after run downloads a Python or recreates.venv, and itsuv pip install -e .step runs withUV_PYTHONset to the job's version.The 2 skipped on 3.11 and 3.12 are the
nul-bytecases oftest_merge_csv_responses_turns_a_body_the_csv_module_cannot_read_into_a_parse_error, which skip from 3.11 on because the csv module reads NUL as data there. 3.10 skips none, so the count follows the interpreter as well.¹ The intermittent
FloatingPointErrorof #155 (test_a_null_date_keeps_its_row_on_the_other_decoded_formats[stocks.news-pandas]), raised from.venv/lib/python3.10/site-packages/numpy: a 3.11 job running 3.10.²
test_status_lists_every_service: the live/status/answered a 500 HTML page at 12:04 UTC on 2026-09-28. It has nothing to do with the interpreter, and the after run passes it.Lint: main run 36139219342 sets up 3.12.14, then logs
Downloading cpython-3.10.21andUsing CPython 3.10.21. The dispatch on this branch, 36484949723, logsSet UV_PYTHON to 3.12andUsing CPython 3.12.14 interpreter at: /opt/hostedtoolcache/Python/3.12.14/x64/bin/python3.12, and passes.build.ymlruns only from a release, so it was checked locally:uv buildreads.python-versionand builds on 3.10.18, and withUV_PYTHON=3.12it looks for 3.12 and builds on 3.12.12. From the same tree both give the same wheel and sdist, byte for byte (sha256a8601ee2…andcf857c69…).Before the change, the unit suite ran locally (Windows) on 3.11.13 and 3.12.12 with numpy 2.3.5: 1952 passed, 2 skipped on each. Nothing on 3.11 or 3.12 needed fixing.
Closes #156