From be73b234029e5b3fe0aa6553c4c96becea8b0ab5 Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Fri, 16 Oct 2026 11:05:25 +0200 Subject: [PATCH] add support for python 3.15 --- .github/workflows/ci-copier.yml | 2 +- copier.yml | 1 + template/.github/workflows/ci.yml.jinja | 2 +- template/pixi.toml.jinja | 8 ++++++++ template/pyproject.toml.jinja | 3 +++ tests/test_template.py | 6 ++++-- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-copier.yml b/.github/workflows/ci-copier.yml index f40da8e..f2f3ee8 100644 --- a/.github/workflows/ci-copier.yml +++ b/.github/workflows/ci-copier.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - minimal-python-version: [py311, py314] + minimal-python-version: [py311, py315] steps: - name: Check out branch uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/copier.yml b/copier.yml index 0070be1..cbf1da0 100644 --- a/copier.yml +++ b/copier.yml @@ -50,6 +50,7 @@ minimal_python_version: - py312 - py313 - py314 + - py315 default: py311 use_devcontainer: diff --git a/template/.github/workflows/ci.yml.jinja b/template/.github/workflows/ci.yml.jinja index c3bae46..e463e0d 100644 --- a/template/.github/workflows/ci.yml.jinja +++ b/template/.github/workflows/ci.yml.jinja @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: -{%- set python_versions = ["py311", "py312", "py313", "py314"] %} +{%- set python_versions = ["py311", "py312", "py313", "py314", "py315"] %} {%- set minimal_version_index = python_versions.index(minimal_python_version) %} environment: {%- for python_version in python_versions[minimal_version_index:] %} diff --git a/template/pixi.toml.jinja b/template/pixi.toml.jinja index 396392a..1155ab5 100644 --- a/template/pixi.toml.jinja +++ b/template/pixi.toml.jinja @@ -71,6 +71,11 @@ python = "3.13.*" [feature.py314.dependencies] python = "3.14.*" {%- endif %} +{%- if minimal_python_version <= "py315" %} + +[feature.py315.dependencies] +python = "3.15.*" +{%- endif %} [environments] default = ["test", "build", "lint"] @@ -86,3 +91,6 @@ py313 = ["py313", "test"] {%- if minimal_python_version <= "py314" %} py314 = ["py314", "test"] {%- endif %} +{%- if minimal_python_version <= "py315" %} +py315 = ["py315", "test"] +{%- endif %} diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 161d5a5..cb6efc1 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -19,7 +19,10 @@ classifiers = [ {%- if minimal_python_version <= "py313" %} "Programming Language :: Python :: 3.13", {%- endif %} +{%- if minimal_python_version <= "py314" %} "Programming Language :: Python :: 3.14", +{%- endif %} + "Programming Language :: Python :: 3.15", ] requires-python = ">={{ minimal_python_version.replace('py3', '3.') }}" readme = "README.md" diff --git a/tests/test_template.py b/tests/test_template.py index 27d2b8d..2da49cf 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -53,10 +53,12 @@ def test_agents_md(generated_project): assert claude_md.resolve() == (generated_project / "AGENTS.md").resolve() -@pytest.mark.parametrize("minimal_python_version", ["py311", "py312", "py313", "py314"]) +@pytest.mark.parametrize( + "minimal_python_version", ["py311", "py312", "py313", "py314", "py315"] +) def test_minimal_python_version(generate_project, minimal_python_version: str): minimal_python_version_str = minimal_python_version.replace("py3", "3.") - all_supported_python_versions = ["3.11", "3.12", "3.13", "3.14"] + all_supported_python_versions = ["3.11", "3.12", "3.13", "3.14", "3.15"] all_supported_python_envs = [ f"py{version.replace('.', '')}" for version in all_supported_python_versions ]