diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0ef2fcf..d85d7722 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cd6043fa..00957146 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ec7d3e4d..097f6f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,12 @@ ### Added -- Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) +* Add Python 3.13 and 3.14 support [#703](https://github.com/NLeSC/python-template/pull/703) +* Typing support. [#698](https://github.com/NLeSC/python-template/pull/698) ### Changed +* Update CI actions to use Python 3.14 instead of 3.12 [#703](https://github.com/NLeSC/python-template/pull/703) * Recommend `ruff format` instead of `yapf` for fixing code style readability [#695](https://github.com/NLeSC/python-template/pull/695) ### Removed diff --git a/setup.cfg b/setup.cfg index f82fc793..2553c02d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,8 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 description = Copier template to initialize Python projects in accordance with Netherlands eScience Center best practices long_description = file: README.md long_description_content_type = text/markdown diff --git a/template/project_setup.md.jinja b/template/project_setup.md.jinja index f5baf308..0d3ab136 100644 --- a/template/project_setup.md.jinja +++ b/template/project_setup.md.jinja @@ -14,6 +14,8 @@ This repository is set up with Python versions: - 3.10 - 3.11 - 3.12 +- 3.13 +- 3.14 Add or remove Python versions based on project requirements. See [the guide](https://guide.esciencecenter.nl/#/language_guides/python) for more information about Python diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 1a854574..4c17e5a4 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -27,6 +27,8 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dependencies = [] description = "{{ package_short_description|replace('\"', '\\\"') }}" @@ -106,7 +108,7 @@ command_line = "-m pytest" [tool.tox] legacy_tox_ini = """ [tox] -envlist = py310,py311,py312 +envlist = py310,py311,py312,py313,py314 skip_missing_interpreters = true {% if AddLocalTests -%} [testenv] diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja index 4bddbb36..9830271d 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionBuild %}build.yml{% endif %}.jinja @@ -17,7 +17,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python ${{ '{{ ' -}} matrix.python-version }} @@ -46,10 +46,10 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | @@ -71,10 +71,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Upgrade pip and install dependencies run: | python -m pip install --upgrade pip setuptools diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} index af2d22b3..7502c3db 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddGitHubActionDocumentation %}documentation.yml{% endif %} @@ -16,10 +16,10 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v6 - - name: Set up Python 3.12 + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | diff --git a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} index c28505a4..2d6a7885 100644 --- a/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} +++ b/template/{% if HasWorkflows %}.github{% endif %}/workflows/{% if AddSonarCloud %}sonarcloud.yml{% endif %} @@ -18,10 +18,10 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up Python + - name: Set up Python 3.14 uses: actions/setup-python@v6 with: - python-version: 3.12 + python-version: 3.14 - name: Python info shell: bash -e {0} run: | diff --git a/tests/test_project.py b/tests/test_project.py index a2b5a35f..aba70347 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -131,8 +131,6 @@ def test_generate_api_docs(baked_with_development_dependencies, project_env_bin_ assert (project_dir / 'docs' / '_build' / 'html' / 'index.html').exists() -@pytest.mark.skipif(sys.version_info < (3, 9), reason= -"requires python 3.9 or higher, see https://github.com/NLeSC/python-template/pull/347#issuecomment-1710684574") def test_coverage_api_docs(baked_with_development_dependencies, project_env_bin_dir): project_dir = baked_with_development_dependencies bin_dir = project_env_bin_dir