Skip to content

feat(image): add Python 3.15 #94

Done

Description

@dan-petty

Problem or Motivation

The image has Python 3.14 only (apt package python3.14, and python3 of sid is 3.14). The projects of the owner move to Python 3.15.2: homelab, infra, danielpetty.com and vibes declare requires-python = ">=3.15.2". In a container of the image, uv downloads a second CPython 3.15 into the home folder of each user, because the image has no Python that these projects accept.

Owner direction of 2026-11-26: the devtools image installs the tools, and PATH gives each user of the container the intended versions.

Debian sid has python3.15 3.15.2-1 for amd64 and arm64 (Debian archive, 2026-11-26).

Proposed Solution

Disposition: change the code.

  • Add the apt package python3.15 to the apt step of the Dockerfile. python3 stays the default of sid, and python3.14 stays for the tool environments and for the consumers that name it.
  • test/tools.sh runs python3.15 --version.
  • The Python tools of the image (copier, pre-commit, semgrep) stay on /usr/bin/python3.14. Measured on 2026-11-26: the hashed lock of semgrep does not install on Python 3.15, because ruamel-yaml-clib 0.2.15 has no wheel for it. copier and pre-commit install.

Proof: the image builds on the two platforms, test/tools.Dockerfile passes, and in a container of the image uv sync of a project with requires-python = ">=3.15.2,<3.16" uses /usr/bin/python3.15 and downloads no Python.

Existing Tool Considered

apt of Debian sid, by the rule of the README: use apt where sid is current. sid has 3.15.2, which is the version that the projects require.

Proposed design

Problem statement

The image has only Python 3.14, and the default python3 of Debian sid is 3.14. The owner projects require Python 3.15.2, so uv downloads a second CPython 3.15 into the home folder of each user. The image must install /usr/bin/python3.15 from the Debian sid apt package, keep Python 3.14 and the default python3, and keep the Python tool environments on 3.14.

Acceptance criteria

Requirement: Install the python3.15 package

The apt step of the Dockerfile SHALL install the Debian sid package python3.15.

Scenario: Built image has Python 3.15

  • WHEN The live check builds the image from the Dockerfile and then builds test/tools.Dockerfile with --build-arg DEVTOOLS set to that image.
  • THEN The build passes and the test/tools.sh output shows + python3.15 --version followed by a line that starts with Python 3.15.2.

Requirement: Run python3.15 in the tool test

test/tools.sh SHALL run python3.15 --version through the run helper.

Scenario: Tool test runs the versioned interpreter

  • WHEN The live check runs test/tools.sh in the built image with no network.
  • THEN The output contains the line + python3.15 --version and the script exits 0.

Requirement: Keep Python 3.14 and the default python3

The image SHALL keep the apt package python3.14 and the Debian sid default python3.

Scenario: Built image keeps Python 3.14

  • WHEN The live check runs test/tools.sh in the built image, which runs run python --version and run python3.14 --version.
  • THEN Both commands exit 0 and each version line starts with Python 3.14.

Requirement: Keep the tool environments on Python 3.14

The Python tool environments SHALL run on the /usr/bin/python3.14 interpreter.

Scenario: Tool environments report Python 3.14

  • WHEN The live check runs test/tools.sh in the built image, which runs /usr/local/lib/devtools/copier/bin/python --version, /usr/local/lib/devtools/pre-commit/bin/python --version and /usr/local/lib/devtools/semgrep/bin/python --version.
  • THEN Each command exits 0 and prints a version line that starts with Python 3.14.

Requirement: Use the system Python 3.15 for uv sync

A project that declares requires-python = ">=3.15.2,<3.16" SHALL get the system Python 3.15 from uv sync in the image and SHALL download no Python.

Scenario: uv sync uses the system interpreter

  • WHEN The live check runs test/tools.sh in the built image with no network, and the script runs UV_PYTHON_DOWNLOADS=never uv sync --no-cache in a temporary project with requires-python = ">=3.15.2,<3.16" and no dependencies.
  • THEN uv sync exits 0 and uv run python -c 'import sys; print(sys.base_prefix)' prints /usr.

Existing Tool Considered

No alternatives check has run. The open, maintained tool that covers the need is the Debian sid apt package python3.15 (3.15.2-1 for amd64 and arm64), from the apt step that already installs python3.14. It lacks a change of the default python3: it adds /usr/bin/python3.15 and leaves python3 on 3.14, so the image keeps python3.14 and python-is-python3. The change builds no tool of its own: it adds one package name to the apt list of the Dockerfile and the checks that prove it to test/tools.sh.

Key questions

  • Should the image change the default python3 to Python 3.15?: No. The image keeps the Debian sid default python3 on 3.14 and adds /usr/bin/python3.15 from the apt package. uv selects the versioned interpreter for a project that requires 3.15. (best practice) [sources: test/tools.sh:39, test/tools.sh:40]
    • Chosen: Keep the sid default python3 on 3.14. python-is-python3 and the tool environments keep the interpreter that they were built and tested with. The versioned /usr/bin/python3.15 on PATH covers the projects that require 3.15.
    • Rejected: Point python3 at /usr/bin/python3.15. It changes the default that sid and python-is-python3 set. It can break the packages and the tool environments that expect 3.14.
  • Which interpreter should the Python tool environments use?: Keep /usr/bin/python3.14 for copier, pre-commit and semgrep. The hashed lock of semgrep names ruamel-yaml-clib==0.2.15, which has no wheel for Python 3.15, so the hashed sync fails on 3.15. (best practice) [sources: python/semgrep.in:1, python/semgrep.txt]
    • Chosen: Keep all tool environments on Python 3.14. The 3.14 environments already install and run, the semgrep lock blocks 3.15, and one interpreter for all tool environments keeps the image consistent.
    • Rejected: Move copier and pre-commit to 3.15 and keep semgrep on 3.14. It adds a second interpreter path and more test cases for no project need.
    • Rejected: Move all tool environments to 3.15. The semgrep hashed lock fails on 3.15 because ruamel-yaml-clib 0.2.15 has no wheel for it.
  • Should the image install Python 3.15 from apt or build it from source?: Install the Debian sid apt package python3.15 3.15.2-1 for amd64 and arm64. The README rule takes apt where sid is current, and sid has the required 3.15.2. (best practice) [sources: README.md]
    • Chosen: Install the Debian sid apt package python3.15. sid has 3.15.2 for amd64 and arm64. apt gives the system interpreter at /usr/bin/python3.15 from the step that already installs Python 3.14.
    • Rejected: Build CPython 3.15 from source. It adds a compiler toolchain, build time and maintenance, and apt covers the need.
    • Rejected: Use a uv-managed Python 3.15. It puts Python in a home folder and does not give the system interpreter that the issue needs.
    • Rejected: Install Python 3.15 with mise. The README rule takes apt where sid is current. A mise Python is not the system interpreter and adds a second install path for Python.
  • Does test/manifests.sh need a change for Python 3.15?: No. The script runs python3 to parse mise.toml, and python3 stays the sid default 3.14. [sources: test/manifests.sh:11]
  • How does uv select /usr/bin/python3.15 when python3 stays 3.14?: uv searches the interpreters on PATH before it downloads one. /usr/bin is on PATH, and the apt package installs /usr/bin/python3.15 with the version in its name, so uv picks it for a project that requires 3.15. The live check proves the choice with UV_PYTHON_DOWNLOADS=never, which makes a wrong selection fail instead of download a Python. (best practice) [sources: test/tools.Dockerfile]
    • Chosen: Rely on the uv PATH discovery and prove it with the live check. /usr/bin is on PATH and the versioned package installs /usr/bin/python3.15. UV_PYTHON_DOWNLOADS=never in the live check makes a wrong selection fail the build.
    • Rejected: Pin UV_PYTHON=/usr/bin/python3.15 in the image ENV. It forces 3.15 on every project, including the projects and the tool environments that need 3.14.
    • Rejected: Set UV_PYTHON_DOWNLOADS=never in the image ENV. It stops the download for every user, but a project that needs a Python the image lacks then fails. The issue asks for 3.15 on PATH, not a change of the uv download policy for every consumer.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    status/new
    on Nov 26, 2026
  2. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor
  3. added
    value/medium
    effort/low
    source/agent
    scope/image
    priority/p2-medium
    on Nov 26, 2026
  4. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 26, 2026
  6. removed
    status/in-review
    on Nov 26, 2026
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/lowpriority/p2-mediumscope/imagesource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions