Skip to content

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.

Rust

fix(ci): use Python 3.12 for builds and validation (#825)

nachiketb-nvidia336196f6fbfc
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 22674ec92..508d1a3dd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -153,7 +153,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.10", "3.12", "3.14"]
+ python-version: ["3.12", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
@@ -213,7 +213,7 @@ jobs:
- name: Verify slim install (no extras) succeeds
working-directory: /tmp
run: |
- uv run --isolated --no-project --python 3.10 \
+ uv run --isolated --no-project --python 3.12 \
--with "${SWITCHYARD_DEFAULT_PACKAGE}" \
python -c "import switchyard; from switchyard_rust.server import Server; print('import OK, version:', switchyard.__version__, 'server:', Server)"
uv run --isolated --no-project --python 3.14 \
@@ -222,7 +222,7 @@ jobs:
- name: Assert heavy packages absent from slim install
working-directory: /tmp
run: |
- uv run --isolated --no-project --python 3.10 \
+ uv run --isolated --no-project --python 3.12 \
--with "${SWITCHYARD_DEFAULT_PACKAGE}" \
python - <<'PY'
import importlib.util
diff --git a/.github/workflows/package-portability.yml b/.github/workflows/package-portability.yml
index 736694d7d..8615f8cdf 100644
--- a/.github/workflows/package-portability.yml
+++ b/.github/workflows/package-portability.yml
@@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.12"
- name: Build manylinux x86_64 wheel
shell: bash
run: |
@@ -65,7 +65,7 @@ jobs:
set -euxo pipefail
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
source "${HOME}/.cargo/env"
- PYTHON=/opt/python/cp310-cp310/bin/python
+ PYTHON=/opt/python/cp312-cp312/bin/python
"${PYTHON}" -m pip install --upgrade pip
"${PYTHON}" -m pip install "maturin==${MATURIN_VERSION}"
"${PYTHON}" -m maturin build \
@@ -75,7 +75,7 @@ jobs:
--out dist \
--interpreter "${PYTHON}"
'
- - name: Smoke install wheel on Python 3.10
+ - name: Smoke install wheel on Python 3.12
shell: bash
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 5a23e8c37..f4bcea100 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -87,7 +87,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
+ python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
@@ -126,7 +126,7 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
- python-version: "3.10"
+ python-version: "3.12"
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv sync --locked
@@ -161,7 +161,7 @@ jobs:
working-directory: /tmp
run: |
sdist="$(find "${GITHUB_WORKSPACE}/dist" -maxdepth 1 -name '*.tar.gz' -print -quit)"
- uv run --isolated --no-project --python 3.10 \
+ uv run --isolated --no-project --python 3.12 \
--with "${sdist}" \
python -c "from switchyard_rust import _switchyard_rust; print('sdist install OK:', _switchyard_rust.__name__)"
- uses: actions/upload-artifact@v4
@@ -208,7 +208,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.12"
- name: Stamp dev wheel metadata
if: ${{ github.event_name == 'workflow_dispatch' && inputs.build_dev_matrix }}
shell: bash
@@ -241,7 +241,7 @@ jobs:
set -euxo pipefail
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
source "${HOME}/.cargo/env"
- PYTHON=/opt/python/cp310-cp310/bin/python
+ PYTHON=/opt/python/cp312-cp312/bin/python
"${PYTHON}" -m pip install --upgrade pip
"${PYTHON}" -m pip install "maturin==${MATURIN_VERSION}"
"${PYTHON}" -m maturin build \
@@ -261,7 +261,7 @@ jobs:
--compatibility pypi \
--out dist \
--target "${{ matrix.rust_target }}"
- - name: Smoke install native wheel on Python 3.10
+ - name: Smoke install native wheel on Python 3.12
if: ${{ matrix.smoke }}
shell: bash
run: |
@@ -328,7 +328,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
- python-version: "3.10"
+ python-version: "3.12"
- name: Stamp dev wheel metadata
shell: bash
run: |
@@ -346,7 +346,7 @@ jobs:
set -euxo pipefail
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
source "${HOME}/.cargo/env"
- PYTHON=/opt/python/cp310-cp310/bin/python
+ PYTHON=/opt/python/cp312-cp312/bin/python
"${PYTHON}" -m pip install --upgrade pip
"${PYTHON}" -m pip install "maturin==${MATURIN_VERSION}"
"${PYTHON}" -m maturin build \
diff --git a/docs/internal/release_workflow.md b/docs/internal/release_workflow.md
index 0d0ae38ed..b51ceb2aa 100644
--- a/docs/internal/release_workflow.md
+++ b/docs/internal/release_workflow.md
@@ -62,13 +62,16 @@ publish anything to PyPI.
Create a root `vMAJOR.MINOR.PATCH` tag only when a real release has been approved. Tag pushes run:
-- Python release checks on Python 3.10 through 3.14;
+- Python release checks on Python 3.12 through 3.14;
- Rust fmt, clippy, and workspace tests;
- source distribution build;
- full abi3 wheel matrix for Linux x86_64, Linux aarch64, macOS x86_64, macOS arm64,
Windows x86_64, and Windows arm64;
- native wheel smoke installs where the runner can execute the artifact.
+CI and distribution builds use Python 3.12 or newer. Package metadata and the wheel's stable ABI
+still target Python 3.10 or newer, but CI no longer tests Python 3.10 or 3.11.
+
The workflow rejects release tags that do not exactly match `pyproject.toml`'s package version. For
example, package version `0.2.0` must be released with the `v0.2.0` tag. The Rust workspace and
Python package versions must also match.