Skip to content

build(python): move the project to Python 3.15.2 #7291

Backlog

Description

@dan-petty

Problem or Motivation

The owner decision of 2026-11-26 is that each active Python project uses Python 3.15.2. homelab, infra and danielpetty.com already require it, and vibes moves with dan-petty/vibes#312. devops-cli runs on Python 3.14: .python-version is 3.14.10 and requires-python = ">=3.14".

The move cannot be made today. Two packages of the dev group have no wheel for CPython 3.15 on PyPI (read 2026-11-26):

Package Why devops-cli has it State on PyPI
cel-expr-python 0.1.4 (newest) tests/gate/k8s_checks/job_admission_policy.py evaluates the CEL of the Job admission policy wheels for cp310 to cp314, and no source package: it cannot install on 3.15
lupa 2.8 (newest) fakeredis[lua] runs EVAL in the Valkey tests wheels up to cp314; the source package needs a C compiler, and the devtools image has none

All other packages install from wheels. fastuuid has no cp315 wheel either, but litellm asks for it only below Python 3.15.

Measured on 2026-11-26 at release 0.221.13, with CPython 3.15.2 and the locked versions of uv.lock without the two packages:

  • devops --version starts.
  • pytest tests: 27581 passed, 7 failed, 3 skipped in 818 s. Each of the 7 failures is a Valkey test that needs EVAL (6 in tests/valkey and tests/commands/test_valkey.py, 1 in tests/roadmap/stores/test_listing_shared.py).

So the code runs on 3.15.2, and only the two packages block the move.

Proposed Solution

Disposition: change the code, when the block is gone. Do not build a compiler into the image, and do not replace the two packages only for this move.

The block is gone when the newest cel-expr-python and lupa have a cp315 wheel for manylinux on x86_64 and aarch64. Then, in one pull request:

  • .python-version to 3.15.2, and requires-python = ">=3.15.2,<3.16" (the form of homelab and infra), with uv lock.
  • Dockerfile: the stages on python:3.14-slim-trixie move to python:3.15-slim-trixie, and the stages on the devtools image use /usr/bin/python3.15 (feat(image): add Python 3.15 devtools#94 adds it) and the python3.15 site-packages paths.
  • The workflows and .github/actions/setup-toolchain install Python 3.15.
  • The documents and defaults that name Python 3.14 or python:3.14-slim (README, CONTRIBUTING, ARCHITECTURE, the command reference, .trivyignore.yaml).
  • Then homelab: python-version: "3.14" of .github/workflows/k8s.yml, which installs the Python of the pinned devops-cli release.

Proof: devops ci --check passes on 3.15.2, and the Service image test passes.

Existing Tool Considered

uv, which selects the interpreter from .python-version and requires-python. Renovate proposes the releases of cel-expr-python and lupa. The shared preset of dan-petty/infra holds a new Python minor on the Dependency Dashboard until an approval; this issue is where that approval is decided.

Alternatives check of 2026-12-02: partly.
Tool: cel-python (https://pypi.org/project/cel-python), not stated, last activity 2026-01-31, maintained.
Reason: Searches found cel-python, a pure Python CEL evaluator that installs on Python 3.15 with no cp315 wheel. It removes the CEL block only. No tool removes the lupa Lua block, so the move still waits.

Covers:

  • Evaluates CEL expressions in pure Python, no cp315 wheel
  • Installs on CPython 3.15 with no compiler
  • Apache-2.0, maintained by cloud-custodian

Lacks:

  • No Lua VM, so the Valkey EVAL tests stay blocked
  • Supplies no cp315 wheel for lupa
  • Does not change .python-version, Dockerfile or workflows
  • The proposed solution does not adopt it

Proposed design

Problem statement

Do not start the Python 3.15.2 move until cp315 wheels for cel-expr-python and lupa exist and dan-petty/devtools#94 adds /usr/bin/python3.15. devops-cli runs on Python 3.14.10, and the owner decision requires Python 3.15.2. The code already runs on 3.15.2 without the two packages. Only seven Valkey EVAL tests fail.

Acceptance criteria

Requirement: Interpreter and requirement

The project MUST declare Python 3.15.2 in .python-version and requires-python = ">=3.15.2,<3.16" in pyproject.toml, and uv.lock MUST be the output of uv lock.

Scenario: Interpreter and metadata agree

  • WHEN uv run python --version and uv lock --check run in the checkout after the change
  • THEN The first command prints Python 3.15.2 and the second exits 0.

Requirement: Source Python defaults

The Python defaults that the source records MUST be 3.15: DEFAULT_PYTHON_VERSION in src/devops_cli/config/defaults.py and the ProjectMetadata defaults in src/devops_cli/config/metadata.py.

Scenario: Python defaults

  • WHEN uv run pytest tests/config/test_metadata.py and uv run python -c "from devops_cli.config.defaults import DEFAULT_PYTHON_VERSION; assert DEFAULT_PYTHON_VERSION == '3.15'" run
  • THEN Both commands exit 0, and the loaded project metadata reports Python 3.15.

Requirement: Type checker Python settings

The [tool.mypy] python_version and the [tool.ty.environment] python-version in pyproject.toml MUST be 3.15.

Scenario: Type checker settings

  • WHEN uv run mypy src/devops_cli/config/defaults.py and uv run ty check src/devops_cli/config/defaults.py run
  • THEN Both commands exit 0.

Requirement: Service image base

Each Dockerfile stage that builds on python:3.14-slim-trixie MUST build on python:3.15-slim-trixie.

Scenario: Service Image Tests

  • WHEN the Service Image Tests workflow (service-image-test.yml) runs on the pull request
  • THEN It passes, and python --version in the built Service image prints Python 3.15.2.

Requirement: Runner image Python and uv seed

The runner stages MUST name /usr/bin/python3.15 in UV_PYTHON and the .venv/lib/python3.15/site-packages paths, and the uv-seed stage MUST write "python": "3.15" in /seed.json.

Scenario: Runner image smoke test

  • WHEN the Runner Image job of ci.yml builds the runner and uv-seed targets and runs their smoke tests, with smoke.Dockerfile reading /seed.json
  • THEN Each smoke test exits 0 and python -m devops_cli.roadmap.runner_tools reports every tool.

Requirement: CI Python version

.github/actions/setup-toolchain and each workflow that pins the interpreter MUST install Python 3.15.

Scenario: CI interpreter

  • WHEN a CI job that uses .github/actions/setup-toolchain runs python --version
  • THEN It prints Python 3.15.2.

Requirement: Documents and defaults

The documents and the defaults that name Python 3.14 or python:3.14-slim MUST name Python 3.15.2 or python:3.15-slim.

Scenario: Docs check

  • WHEN uv run devops ci --check --only docs runs
  • THEN It exits 0 and the regenerated command reference names Python 3.15.

Requirement: Scan ignore paths

.trivyignore.yaml MUST name the .venv/lib/python3.15/site-packages path of each harbor template Dockerfile.

Scenario: Static Analysis scan report

  • WHEN the Static Analysis job of ci.yml runs devops scan report
  • THEN It reports no DS-0029 or DS-0002 finding for the harbor template Dockerfiles.

Requirement: Valkey EVAL tests

The Valkey tests that use EVAL MUST pass on Python 3.15.2.

Scenario: Valkey EVAL suite

  • WHEN uv run pytest tests/valkey tests/commands/test_valkey.py tests/roadmap/stores/test_listing_shared.py runs on Python 3.15.2
  • THEN It exits 0 with no failure.

Requirement: Full CI on Python 3.15.2

The project MUST pass uv run devops ci --check on Python 3.15.2.

Scenario: Full CI

  • WHEN uv run devops ci --check runs on Python 3.15.2
  • THEN It exits 0.

Requirement: Pending a person after the merge

The released runner image MUST start an implement Job for a dan-petty/homelab item that requires Python 3.15.2.

Scenario: Homelab implement Job

  • WHEN a person triggers an implement Job for a homelab item after the runner image release
  • THEN The Job passes bootstrap and starts the model request.

Existing Tool Considered

The alternatives check in the issue body gives a partly verdict for cel-python (https://pypi.org/project/cel-python). The check lists what the tool covers and lacks. The proposal does not adopt it. It waits for cp315 wheels of cel-expr-python and lupa, which the tool does not provide.

Key questions

  • Which Python version and requirement range does devops-cli use?: Python 3.15.2, with requires-python = ">=3.15.2,<3.16". The owner decision of 2026-11-26 in the issue body sets this version for each active Python project. CONTRIBUTING.md makes a new Python minor a migration that the Dependency Dashboard lists until a person or an agent approves it. This item is that approval. (best practice) [sources: pyproject.toml, CONTRIBUTING.md]
    • Chosen: Python 3.15.2. The owner decision of 2026-11-26 sets this version, and the other active projects already require it.
    • Rejected: Python 3.14.10. The current version in .python-version; the owner decision replaces it.
    • Rejected: Python 3.16. No owner decision names it, and the two blocking packages have no cp316 wheel.
  • How does the project handle cel-expr-python and lupa for the move?: Keep both packages until the newest cel-expr-python and lupa have cp315 manylinux wheels for x86_64 and aarch64. Do not build a compiler into the image. Do not replace the packages only for this move. The alternatives check found that cel-python covers the CEL part, but it has no Lua VM, so it leaves the Valkey EVAL block. (best practice) [sources: pyproject.toml, tests/gate/k8s_checks/job_admission_policy.py, tests/valkey/test_valkey_contract.py]
    • Chosen: Wait for cp315 wheels. The code runs on 3.15.2 without the two packages, and the alternatives check found no tool that supplies a Lua VM.
    • Rejected: Build a compiler into the image. The devtools image has no compiler, and the build adds cost for a temporary block.
    • Rejected: Replace cel-expr-python with cel-python now. It removes only the CEL block, and lupa still blocks the Valkey EVAL tests.
  • Which Python path does the devtools image provide for the move?: The devtools image provides its Python as /usr/bin/python3.<minor>. The Dockerfile names /usr/bin/python3.14 in UV_PYTHON, and smoke.Dockerfile names the same path. The venv copies the python3.14 site-packages paths. So the move names /usr/bin/python3.15 and .venv/lib/python3.15/site-packages. The uv-seed record holds the Python minor, and _seed_fits compares it, so the seed is rebuilt with 3.15. [sources: smoke.Dockerfile, src/devops_cli/roadmap/runner_tools.py]
  • Which proof shows the move is complete?: uv run devops ci --check passes on Python 3.15.2. The Service Image Tests workflow passes on the built image. (best practice) [sources: .github/workflows/service-image-test.yml, tests/invariants/test_service_image.py, .github/workflows/ci.yml]
    • Chosen: Full CI and the Service Image Tests. They cover the code, the workflows and the image build.
    • Rejected: Unit tests only. They miss the image build and the workflow setup.
  • Which other files record the project's Python minor?: pyproject.toml holds [tool.mypy] python_version and [tool.ty.environment] python-version. src/devops_cli/config/defaults.py holds DEFAULT_PYTHON_VERSION, and src/devops_cli/config/metadata.py holds the ProjectMetadata defaults. smoke.Dockerfile asserts .python == "3.14". .trivyignore.yaml holds the harbor paths. .github/actions/setup-toolchain/action.yml holds the setup-uv input. The workflows release.yml and release-merge.yml pin the same minor. [sources: pyproject.toml, src/devops_cli/config/defaults.py, src/devops_cli/config/metadata.py, smoke.Dockerfile, .trivyignore.yaml, .github/actions/setup-toolchain/action.yml, .github/workflows/release.yml, .github/workflows/release-merge.yml]
  • Should the homelab workflow change ship with this issue?: No. Defer it to a separate homelab issue after the devops-cli release. AGENTS.md and CONTEXT.md give one issue and one pull request that delivers nothing else. The k8s.yml workflow is a file of another repository. (best practice) [sources: AGENTS.md, CONTEXT.md]
    • Chosen: Defer it to a homelab issue. It waits for the devops-cli release and belongs to the homelab repository.
    • Rejected: Ship it in this pull request. It changes another repository, and one item delivers one pull request that delivers nothing else.

Fit

Fits in one pull request.

Suspected block

The newest cel-expr-python and lupa have no cp315 manylinux wheel for x86_64 and aarch64, and dan-petty/devtools#94 has not added /usr/bin/python3.15.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor
    • Scope: none. The title has the scope python, and .github/labels.yml declares no scope/python label. Add the label to the file to give the scope to this item.
    • Related: refactor(config): read the python minor from the package metadata #6410, which asks for a different change. Both concern the Python minor version in the project, but #6410 refactors how the version is read from metadata while this candidate changes the version to 3.15.2.
  2. added
    type/infra
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 26, 2026
  3. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (7)

    Tools considered:

    Searches run:

    • cel-expr-python CPython 3.15 wheel release, results: 5
    • pure Python CEL expression evaluator library cel-python, results: 5
    • fakeredis lua support lupa alternative EVAL, results: 5
    • cel-python PyPI Common Expression Language pure Python implementation, results: 5
    • lupa cp315 wheel Python 3.15 support, results: 5
    • cel-python cloud custodian CEL interpreter library, results: 5
    • Lua interpreter in pure Python package alternative to lupa, results: 5

    Sources:

  4. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor

    One more effect of the Python difference, seen on 2026-11-26: the implement Job of the roadmap Service cannot start work on an item of dan-petty/homelab.

    Until the runner image has Python 3.15.2, an agent or a person builds the planned homelab items (done by hand for #269, #305 and #320).

  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  6. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumsource/agentstatus/newtype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions