From a84d7e0efe25003c53325d864ef9a529f8bfdfc5 Mon Sep 17 00:00:00 2001 From: Dmitry Meyer Date: Wed, 21 Oct 2026 09:40:49 +0000 Subject: [PATCH] Support Python 3.15 Allow `python: "3.15"` in run configurations. The base image 0.16 preinstalls Python 3.15.0. This also fixes servers running on Python 3.15: runs without `python` default to the server's Python version, which was rejected as unsupported. --- .github/workflows/build-artifacts.yml | 2 +- .tox.justfile | 8 ++++---- src/dstack/_internal/core/models/configurations.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 1f28825a81..bf04205a87 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -64,7 +64,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.tox.justfile b/.tox.justfile index f7db5d8231..102789f34d 100644 --- a/.tox.justfile +++ b/.tox.justfile @@ -1,5 +1,5 @@ # Keep in sync with pyproject.toml and .github/workflows/build-artifacts.yml -supported_python_versions := '3.10,3.11,3.12,3.13,3.14' +supported_python_versions := '3.10,3.11,3.12,3.13,3.14,3.15' install_tox_msg := ''' tox is not installed; to install it using uv: @@ -7,11 +7,11 @@ install_tox_msg := ''' ''' python_version_msg := ''' - .python-version does not exist; to create (replace 3.14 with the desired version): + .python-version does not exist; to create (replace 3.15 with the desired version): * using uv: - uv python pin 3.14 + uv python pin 3.15 * if uv is not used: - echo 3.14 > .python-version + echo 3.15 > .python-version ''' [doc(''' diff --git a/src/dstack/_internal/core/models/configurations.py b/src/dstack/_internal/core/models/configurations.py index ba7c62af0c..6cf8e423ff 100644 --- a/src/dstack/_internal/core/models/configurations.py +++ b/src/dstack/_internal/core/models/configurations.py @@ -93,6 +93,7 @@ class PythonVersion(str, Enum): PY312 = "3.12" PY313 = "3.13" PY314 = "3.14" + PY315 = "3.15" class PortMapping(CoreModel):