From 19fe4c3a8ed278a1f6483b47b686aeaa0f9531b3 Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Tue, 25 Feb 2025 15:22:22 +0000 Subject: [PATCH] Update Python versions to adhere to SPEC0 --- .github/workflows/test.yml | 6 +++--- tests/test_cookiecutter.py | 6 +++--- .../.github/workflows/test_and_deploy.yml | 6 +++--- {{cookiecutter.package_name}}/pyproject.toml | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bd6bb3..130bccf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,14 +23,14 @@ jobs: strategy: matrix: # Run all supported Python versions on linux - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.11", "3.12", "3.13"] os: [ubuntu-latest] # Include one windows and macos run include: - os: macos-latest - python-version: "3.10" + python-version: "3.13" - os: windows-latest - python-version: "3.10" + python-version: "3.13" steps: - uses: actions/checkout@v3 diff --git a/tests/test_cookiecutter.py b/tests/test_cookiecutter.py index 61a1251..1251901 100644 --- a/tests/test_cookiecutter.py +++ b/tests/test_cookiecutter.py @@ -227,7 +227,7 @@ def test_pyproject_toml(package_path_config_dict): ) assert project_toml["project"]["description"] == "Lets Test CookieCutter" assert project_toml["project"]["readme"] == "README.md" - assert project_toml["project"]["requires-python"] == ">=3.9.0" + assert project_toml["project"]["requires-python"] == ">=3.11.0" assert ( project_toml["project"]["license"]["text"] == "MIT" ) # parameterize this? test if url not given? @@ -236,9 +236,9 @@ def test_pyproject_toml(package_path_config_dict): "Development Status :: 2 - Pre-Alpha", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "License :: OSI Approved :: MIT License", ] diff --git a/{{cookiecutter.package_name}}/.github/workflows/test_and_deploy.yml b/{{cookiecutter.package_name}}/.github/workflows/test_and_deploy.yml index 279ef85..7c107c1 100644 --- a/{{cookiecutter.package_name}}/.github/workflows/test_and_deploy.yml +++ b/{{cookiecutter.package_name}}/.github/workflows/test_and_deploy.yml @@ -27,14 +27,14 @@ jobs: strategy: matrix: # Run all supported Python versions on linux - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.11", "3.12", "3.13"] os: [ubuntu-latest] # Include one windows and macos run include: - os: macos-latest - python-version: "3.10" + python-version: "3.13" - os: windows-latest - python-version: "3.10" + python-version: "3.13" steps: # Run tests diff --git a/{{cookiecutter.package_name}}/pyproject.toml b/{{cookiecutter.package_name}}/pyproject.toml index 9baddf8..07ab9d7 100644 --- a/{{cookiecutter.package_name}}/pyproject.toml +++ b/{{cookiecutter.package_name}}/pyproject.toml @@ -3,7 +3,7 @@ name = "{{cookiecutter.package_name}}" authors = [{name = "{{cookiecutter.full_name}}", email= "{{cookiecutter.email}}"}] description = "{{cookiecutter.short_description}}" readme = "README.md" -requires-python = ">=3.9.0" +requires-python = ">=3.11.0" dynamic = ["version"] dependencies = [] @@ -26,9 +26,9 @@ classifiers = [ "Development Status :: 2 - Pre-Alpha", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", {% if cookiecutter.license == "MIT" -%} "License :: OSI Approved :: MIT License", @@ -140,14 +140,14 @@ docstring-code-format = true # Also format code in docstrings (e.g. examples) [tool.tox] legacy_tox_ini = """ [tox] -envlist = py{39,310,311} +envlist = py{311,312,313} isolated_build = True [gh-actions] python = - 3.9: py39 - 3.10: py310 3.11: py311 + 3.12: py312 + 3.13: py313 [testenv] extras =