Skip to content

Commit 77b1416

Browse files
authored
Deprecate python 3.8, add support for python 3.13 (#35)
1 parent 3e728f9 commit 77b1416

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

.github/workflows/ci-copier.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ jobs:
4242
runs-on: ubuntu-latest
4343
strategy:
4444
matrix:
45-
minimal-python-version: [py38, py310]
45+
minimal-python-version: [py39, py311, py313]
4646
steps:
4747
- name: Checkout branch
4848
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4949
with:
5050
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
51+
fetch-depth: 0
5152
- name: Set up pixi
5253
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
5354
with:
@@ -73,10 +74,10 @@ jobs:
7374
--data github_user="LandoCalrissian" \
7475
--data author_name="Lando Calrissian" \
7576
--data author_email="[email protected]" \
76-
--data project_slug="package" \
7777
--data minimal_python_version="${{ matrix.minimal-python-version }}" \
7878
--defaults \
7979
--trust \
80+
--vcs-ref HEAD \
8081
. out
8182
cd out
8283
# Replace actions trigger with on: [push]

copier.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ minimal_python_version:
4646
type: str
4747
help: What is the minimal Python version you want to support?
4848
choices:
49-
- py38
5049
- py39
5150
- py310
5251
- py311
5352
- py312
54-
default: py38
53+
- py313
54+
default: py39
5555

5656
minimal_python_version_sortable:
5757
type: str
58-
default: "{{ minimal_python_version.replace('py38', 'py308').replace('py39', 'py309') }}"
58+
default: "{{ minimal_python_version.replace('py39', 'py309') }}"
5959
when: false
6060

6161
use_devcontainer:

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

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

template/pixi.toml.jinja

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]
77
postinstall = "pip install --no-build-isolation --no-deps --disable-pip-version-check -e ."
88

99
[dependencies]
10-
python = ">={{ minimal_python_version[2:].replace('3', '3.') }}"
10+
python = ">={{ minimal_python_version.replace('py3', '3.') }}"
1111

1212
[host-dependencies]
1313
pip = "*"
@@ -43,23 +43,20 @@ typos = "*"
4343
pre-commit-install = "pre-commit install"
4444
pre-commit-run = "pre-commit run -a"
4545

46-
{% if minimal_python_version_sortable <= "py308" %}[feature.py38.dependencies]
47-
python = "3.8.*"
48-
{% endif %}{% if minimal_python_version_sortable <= "py309" %}[feature.py39.dependencies]
46+
{% if minimal_python_version_sortable <= "py309" %}[feature.py39.dependencies]
4947
python = "3.9.*"
5048
{% endif %}{% if minimal_python_version_sortable <= "py310" %}[feature.py310.dependencies]
5149
python = "3.10.*"
5250
{% endif %}{% if minimal_python_version_sortable <= "py311" %}[feature.py311.dependencies]
5351
python = "3.11.*"
5452
{% endif %}{% if minimal_python_version_sortable <= "py312" %}[feature.py312.dependencies]
5553
python = "3.12.*"
54+
{% endif %}{% if minimal_python_version_sortable <= "py313" %}[feature.py313.dependencies]
55+
python = "3.13.*"
5656
{%- endif %}
5757

5858
[environments]
5959
default = ["test"]
60-
{%- if minimal_python_version_sortable <= "py308" %}
61-
py38 = ["py38", "test"]
62-
{%- endif %}
6360
{%- if minimal_python_version_sortable <= "py309" %}
6461
py39 = ["py39", "test"]
6562
{%- endif %}
@@ -72,6 +69,9 @@ py311 = ["py311", "test"]
7269
{%- if minimal_python_version_sortable <= "py312" %}
7370
py312 = ["py312", "test"]
7471
{%- endif %}
72+
{%- if minimal_python_version_sortable <= "py313" %}
73+
py313 = ["py313", "test"]
74+
{%- endif %}
7575
{%- if build_docs %}
7676
docs = ["docs"]
7777
{%- endif %}

template/pyproject.toml.jinja

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ authors = [{ name = "{{ author_name }}", email = "{{ author_email }}" }]
1111
dynamic = ["version"]
1212
classifiers = [
1313
"Programming Language :: Python :: 3",
14-
{%- if minimal_python_version_sortable <= "py308" %}
15-
"Programming Language :: Python :: 3.8",
16-
{%- endif %}
1714
{%- if minimal_python_version_sortable <= "py309" %}
1815
"Programming Language :: Python :: 3.9",
1916
{%- endif %}
@@ -23,9 +20,12 @@ classifiers = [
2320
{%- if minimal_python_version_sortable <= "py311" %}
2421
"Programming Language :: Python :: 3.11",
2522
{%- endif %}
23+
{%- if minimal_python_version_sortable <= "py312" %}
2624
"Programming Language :: Python :: 3.12",
25+
{%- endif %}
26+
"Programming Language :: Python :: 3.13",
2727
]
28-
requires-python = ">={{ minimal_python_version[2:].replace('3', '3.') }}"
28+
requires-python = ">={{ minimal_python_version.replace('py3', '3.') }}"
2929
readme = "README.md"
3030
dependencies = []
3131

@@ -65,7 +65,7 @@ quote-style = "double"
6565
indent-style = "space"
6666

6767
[tool.mypy]
68-
python_version = '{{ minimal_python_version[2:].replace('3', '3.') }}'
68+
python_version = '{{ minimal_python_version.replace('py3', '3.') }}'
6969
no_implicit_optional = true
7070
check_untyped_defs = true
7171

tests/test_template.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ def test_add_autobump_workflow(generate_project, add_autobump_workflow):
5757

5858

5959
@pytest.mark.parametrize(
60-
"minimal_python_version", ["py38", "py39", "py310", "py311", "py312"]
60+
"minimal_python_version", ["py39", "py310", "py311", "py312", "py313"]
6161
)
6262
def test_minimal_python_version(generate_project, minimal_python_version: str):
63-
minimal_python_version_str = minimal_python_version.replace("py", "").replace(
64-
"3", "3."
65-
)
66-
all_supported_python_versions = ["3.8", "3.9", "3.10", "3.11", "3.12"]
63+
minimal_python_version_str = minimal_python_version.replace("py3", "3.")
64+
all_supported_python_versions = ["3.9", "3.10", "3.11", "3.12", "3.13"]
6765
all_supported_python_envs = [
6866
f"py{version.replace('.', '')}" for version in all_supported_python_versions
6967
]

0 commit comments

Comments
 (0)