Skip to content

Commit 252101a

Browse files
authored
add support for py314, remove py39 (#134)
1 parent d898d4b commit 252101a

6 files changed

Lines changed: 42 additions & 30 deletions

File tree

.github/workflows/ci-copier.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
strategy:
4545
matrix:
46-
minimal-python-version: [py39, py311, py313]
46+
minimal-python-version: [py310, py311, py314]
4747
steps:
4848
- name: Checkout branch
4949
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -126,3 +126,20 @@ jobs:
126126
do
127127
curl -Ls --header "$AUTH" --request POST "$GITHUB_API_URL/repos/${GITHUB_REPOSITORY}/actions/runs/$line/cancel" > /dev/null
128128
done
129+
130+
finalize:
131+
name: Test CI of generated package (all)
132+
timeout-minutes: 5
133+
runs-on: ubuntu-latest
134+
needs: test-generated-package-ci
135+
if: always() && !cancelled()
136+
steps:
137+
- if: needs.test-generated-package-ci.result == 'success'
138+
name: All tests passed
139+
run: echo All tests passed
140+
141+
- if: needs.test-generated-package-ci.result != 'success'
142+
name: Some tests failed
143+
run: |
144+
echo Some tests failed
145+
exit 1

copier.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,12 @@ minimal_python_version:
4646
type: str
4747
help: What is the minimal Python version you want to support?
4848
choices:
49-
- py39
5049
- py310
5150
- py311
5251
- py312
5352
- py313
54-
default: py39
55-
56-
minimal_python_version_sortable:
57-
type: str
58-
default: "{{ minimal_python_version.replace('py39', 'py309') }}"
59-
when: false
53+
- py314
54+
default: py310
6055

6156
use_devcontainer:
6257
type: bool

template/.github/workflows/ci.yml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
{%- set python_versions = ["py39", "py310", "py311", "py312", "py313"] %}
39+
{%- set python_versions = ["py310", "py311", "py312", "py313", "py314"] %}
4040
{%- set minimal_version_index = python_versions.index(minimal_python_version) %}
4141
environment:
4242
{%- for python_version in python_versions[minimal_version_index:] %}

template/pixi.toml.jinja

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,35 @@ zizmor = "*"
4242
pre-commit-install = "lefthook install"
4343
lint = "lefthook run pre-commit --all-files"
4444

45-
{% if minimal_python_version_sortable <= "py309" %}[feature.py39.dependencies]
46-
python = "3.9.*"
47-
{% endif %}{% if minimal_python_version_sortable <= "py310" %}[feature.py310.dependencies]
45+
{% if minimal_python_version <= "py310" %}[feature.py310.dependencies]
4846
python = "3.10.*"
49-
{% endif %}{% if minimal_python_version_sortable <= "py311" %}[feature.py311.dependencies]
47+
{% endif %}{% if minimal_python_version <= "py311" %}[feature.py311.dependencies]
5048
python = "3.11.*"
51-
{% endif %}{% if minimal_python_version_sortable <= "py312" %}[feature.py312.dependencies]
49+
{% endif %}{% if minimal_python_version <= "py312" %}[feature.py312.dependencies]
5250
python = "3.12.*"
53-
{% endif %}{% if minimal_python_version_sortable <= "py313" %}[feature.py313.dependencies]
51+
{% endif %}{% if minimal_python_version <= "py313" %}[feature.py313.dependencies]
5452
python = "3.13.*"
53+
{% endif %}{% if minimal_python_version <= "py314" %}[feature.py314.dependencies]
54+
python = "3.14.*"
5555
{%- endif %}
5656

5757
[environments]
5858
default = ["test", "lint"]
59-
{%- if minimal_python_version_sortable <= "py309" %}
60-
py39 = ["py39", "test"]
61-
{%- endif %}
62-
{%- if minimal_python_version_sortable <= "py310" %}
59+
{%- if minimal_python_version <= "py310" %}
6360
py310 = ["py310", "test"]
6461
{%- endif %}
65-
{%- if minimal_python_version_sortable <= "py311" %}
62+
{%- if minimal_python_version <= "py311" %}
6663
py311 = ["py311", "test"]
6764
{%- endif %}
68-
{%- if minimal_python_version_sortable <= "py312" %}
65+
{%- if minimal_python_version <= "py312" %}
6966
py312 = ["py312", "test"]
7067
{%- endif %}
71-
{%- if minimal_python_version_sortable <= "py313" %}
68+
{%- if minimal_python_version <= "py313" %}
7269
py313 = ["py313", "test"]
7370
{%- endif %}
71+
{%- if minimal_python_version <= "py314" %}
72+
py314 = ["py314", "test"]
73+
{%- endif %}
7474
{%- if build_docs %}
7575
docs = ["docs"]
7676
{%- endif %}

template/pyproject.toml.jinja

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ authors = [{ name = "{{ author_name }}", email = "{{ author_email }}" }]
1111
dynamic = ["version"]
1212
classifiers = [
1313
"Programming Language :: Python :: 3",
14-
{%- if minimal_python_version_sortable <= "py309" %}
15-
"Programming Language :: Python :: 3.9",
16-
{%- endif %}
17-
{%- if minimal_python_version_sortable <= "py310" %}
14+
{%- if minimal_python_version <= "py310" %}
1815
"Programming Language :: Python :: 3.10",
1916
{%- endif %}
20-
{%- if minimal_python_version_sortable <= "py311" %}
17+
{%- if minimal_python_version <= "py311" %}
2118
"Programming Language :: Python :: 3.11",
2219
{%- endif %}
23-
{%- if minimal_python_version_sortable <= "py312" %}
20+
{%- if minimal_python_version <= "py312" %}
2421
"Programming Language :: Python :: 3.12",
2522
{%- endif %}
23+
{%- if minimal_python_version <= "py313" %}
2624
"Programming Language :: Python :: 3.13",
25+
{%- endif %}
26+
"Programming Language :: Python :: 3.14",
2727
]
2828
requires-python = ">={{ minimal_python_version.replace('py3', '3.') }}"
2929
readme = "README.md"

tests/test_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def test_add_autobump_workflow(generate_project, add_autobump_workflow):
4747

4848

4949
@pytest.mark.parametrize(
50-
"minimal_python_version", ["py39", "py310", "py311", "py312", "py313"]
50+
"minimal_python_version", ["py310", "py311", "py312", "py313", "py314"]
5151
)
5252
def test_minimal_python_version(generate_project, minimal_python_version: str):
5353
minimal_python_version_str = minimal_python_version.replace("py3", "3.")
54-
all_supported_python_versions = ["3.9", "3.10", "3.11", "3.12", "3.13"]
54+
all_supported_python_versions = ["3.10", "3.11", "3.12", "3.13", "3.14"]
5555
all_supported_python_envs = [
5656
f"py{version.replace('.', '')}" for version in all_supported_python_versions
5757
]

0 commit comments

Comments
 (0)