From f79aad9d0b21ac0ada6a7f5d2b0be62900c0f4bb Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Oct 2026 14:13:09 +0200 Subject: [PATCH 1/2] Raise minimum Python version to 3.11 --- .github/workflows/main.yml | 2 +- docs/source/changes.md | 1 + hooks/pre_gen_project.py | 4 ++-- pyproject.toml | 2 +- {{cookiecutter.project_slug}}/.github/workflows/main.yml | 2 +- {{cookiecutter.project_slug}}/.readthedocs.yaml | 2 +- {{cookiecutter.project_slug}}/pyproject.toml | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e5aa00e..e7efd49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 diff --git a/docs/source/changes.md b/docs/source/changes.md index 6089f73..159392b 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -5,6 +5,7 @@ them in reverse chronological order. ## Unreleased +- Require Python 3.11 or newer for the template and generated projects. - {pull}`70` drops support for Python 3.9 and adds support for Python 3.14. - {pull}`71` switches typing from mypy to ty. - {pull}`72` updates the pre-commit hooks. diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 107c71b..7a724bf 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -4,8 +4,8 @@ MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]*$" ENVIRON_REGEX = r"^[-_a-zA-Z0-9]*$" -PYTHONVERSION_REGEX = r"^(3\.(1[0-4])(\.[0-9]{1,2})?)$" -PYTHONVERSION_MIN = "3.10" +PYTHONVERSION_REGEX = r"^(3\.(1[1-4])(\.[0-9]{1,2})?)$" +PYTHONVERSION_MIN = "3.11" EXCEPTION_MSG_MODULE_NAME = """ ERROR: The project slug ({module_name}) is not a valid Python module name. diff --git a/pyproject.toml b/pyproject.toml index ed524e1..6be3b2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Topic :: Scientific/Engineering", "Topic :: Software Development :: Build Tools", ] -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = ["cookiecutter"] [build-system] diff --git a/{{cookiecutter.project_slug}}/.github/workflows/main.yml b/{{cookiecutter.project_slug}}/.github/workflows/main.yml index 57a327a..0fd89a5 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/main.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 diff --git a/{{cookiecutter.project_slug}}/.readthedocs.yaml b/{{cookiecutter.project_slug}}/.readthedocs.yaml index 1478786..0e52c88 100644 --- a/{{cookiecutter.project_slug}}/.readthedocs.yaml +++ b/{{cookiecutter.project_slug}}/.readthedocs.yaml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.10" + python: "3.11" sphinx: configuration: docs/source/conf.py diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index f592fc4..7bf4ee7 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "{{ cookiecutter.project_slug }}" version = "0.1.0" description = "{{ cookiecutter.project_description }}" -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: {{ cookiecutter.open_source_license }} License", From e8009c524d7a10bea5d9492e218b6312af604748 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Oct 2026 14:27:39 +0200 Subject: [PATCH 2/2] chore: link release note to pull request --- docs/source/changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/changes.md b/docs/source/changes.md index 159392b..90ba85e 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -5,7 +5,7 @@ them in reverse chronological order. ## Unreleased -- Require Python 3.11 or newer for the template and generated projects. +- {pull}`125` requires Python 3.11 or newer for the template and generated projects. - {pull}`70` drops support for Python 3.9 and adds support for Python 3.14. - {pull}`71` switches typing from mypy to ty. - {pull}`72` updates the pre-commit hooks.