Skip to content

Commit 4ddbe8b

Browse files
authored
✨ feat: add python3.14 support (including free-threading) (#545)
1 parent bcdef85 commit 4ddbe8b

File tree

8 files changed

+602
-183
lines changed

8 files changed

+602
-183
lines changed

.github/workflows/biliass-build-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
- uses: actions/checkout@v4
108108
- uses: actions/setup-python@v5
109109
with:
110-
python-version: "3.13"
110+
python-version: "3.14"
111111
architecture: ${{ matrix.platform.target }}
112112
allow-prereleases: true
113113
- name: Build wheels

.github/workflows/e2e-test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t"]
15+
python-version:
16+
["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
1617
architecture: ["x64"]
1718
name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} e2e test
1819
steps:
@@ -27,6 +28,7 @@ jobs:
2728
with:
2829
python-version: ${{ matrix.python-version }}
2930
architecture: ${{ matrix.architecture }}
31+
allow-prereleases: true
3032

3133
- name: Install tools
3234
run: |
@@ -40,7 +42,7 @@ jobs:
4042

4143
- name: Install dependencies
4244
run: |
43-
just ci-install
45+
just ci-install ${{ matrix.python-version }}
4446
4547
- name: e2e without subprocess
4648
run: |
@@ -51,4 +53,4 @@ jobs:
5153
5254
- name: e2e test
5355
run: |
54-
just ci-e2e-test
56+
just ci-e2e-test ${{ matrix.python-version }}

.github/workflows/latest-release-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t"]
12+
python-version:
13+
["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
1314
architecture: ["x64"]
1415
name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} latest release test
1516
steps:
@@ -21,6 +22,7 @@ jobs:
2122
with:
2223
python-version: ${{ matrix.python-version }}
2324
architecture: ${{ matrix.architecture }}
25+
allow-prereleases: true
2426

2527
- name: Install tools
2628
run: |

.github/workflows/lint-and-fmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Install dependencies
3737
run: |
38-
just ci-install
38+
just ci-install-all ${{ matrix.python-version }}
3939
4040
- name: lint
4141
run: |

.github/workflows/unit-test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t"]
15+
python-version:
16+
["3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
1617
architecture: ["x64"]
1718
name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} unit test
1819
steps:
@@ -29,6 +30,7 @@ jobs:
2930
with:
3031
python-version: ${{ matrix.python-version }}
3132
architecture: ${{ matrix.architecture }}
33+
allow-prereleases: true
3234

3335
- name: Install just
3436
uses: extractions/setup-just@v3
@@ -37,14 +39,14 @@ jobs:
3739

3840
- name: Install dependencies
3941
run: |
40-
just ci-install
42+
just ci-install ${{ matrix.python-version }}
4143
4244
- name: Run unit tests
4345
run: |
44-
just ci-test
46+
just ci-test ${{ matrix.python-version }}
4547
4648
- name: Run benchmarks
4749
uses: CodSpeedHQ/action@v3
4850
if: ${{ matrix.python-version == '3.13' && github.event_name != 'merge_group' }}
4951
with:
50-
run: uv run pytest --codspeed
52+
run: uv run -p ${{ matrix.python-version }} pytest --codspeed

justfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,23 @@ generate-schema:
7171
uv run scripts/generate-schema.py
7272

7373
# CI specific
74-
ci-install:
75-
uv sync --all-extras --dev
74+
ci-install pyversion:
75+
uv sync --dev -p {{pyversion}}
76+
77+
ci-install-all pyversion:
78+
uv sync --all-extras --dev -p {{pyversion}}
7679

7780
ci-fmt-check:
7881
uv run ruff format --check --diff .
7982

8083
ci-lint:
8184
just lint
8285

83-
ci-test:
84-
uv run pytest -m "(api or processor or biliass) and not (ci_skip or ignore)" --reruns 3 --reruns-delay 1
86+
ci-test pyversion:
87+
uv run -p {{pyversion}} pytest -m "(api or processor or biliass) and not (ci_skip or ignore)" --reruns 3 --reruns-delay 1
8588

86-
ci-e2e-test:
87-
uv run pytest -m "e2e and not (ci_skip or ignore)"
89+
ci-e2e-test pyversion:
90+
uv run -p {{pyversion}} pytest -m "e2e and not (ci_skip or ignore)"
8891

8992
# docker specific
9093
docker-run *ARGS:

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers = [
1818
"Programming Language :: Python :: 3.11",
1919
"Programming Language :: Python :: 3.12",
2020
"Programming Language :: Python :: 3.13",
21+
"Programming Language :: Python :: 3.14",
2122
"Programming Language :: Python :: Implementation :: CPython",
2223
]
2324
dependencies = [
@@ -28,7 +29,7 @@ dependencies = [
2829
"dict2xml>=1.7.7",
2930
"httpx[http2,socks]>=0.28.1",
3031
"tomli>=2.2.1; python_version < '3.11'",
31-
"pydantic>=2.11.7",
32+
"pydantic>=2.12.0a1",
3233
"returns>=0.26.0",
3334
]
3435
optional-dependencies.mcp = ["fastmcp>=2.10.2"]
@@ -45,8 +46,8 @@ yutto = "yutto.__main__:main"
4546
[dependency-groups]
4647
dev = [
4748
"pyright>=1.1.403",
48-
"ruff>=0.12.5",
49-
"typos>=1.34.0",
49+
"ruff>=0.12.7",
50+
"typos>=1.35.0",
5051
"pytest>=8.4.1",
5152
"pytest-rerunfailures>=15.1",
5253
"syrupy>=4.9.1",

0 commit comments

Comments
 (0)