Skip to content

Commit 8f5807d

Browse files
authored
fix: align CI Python versions with PyO3 support (#1)
1 parent 4e49e89 commit 8f5807d

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- "3.11"
2525
- "3.12"
2626
- "3.13"
27-
- "3.14"
2827

2928
steps:
3029
- name: Check out repository

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ classifiers = [
1919
"Programming Language :: Python :: 3.11",
2020
"Programming Language :: Python :: 3.12",
2121
"Programming Language :: Python :: 3.13",
22-
"Programming Language :: Python :: 3.14",
2322
"Programming Language :: Python :: Implementation :: CPython",
2423
"Programming Language :: Rust",
2524
"Topic :: Scientific/Engineering :: Mathematics",

tests/test_project_metadata.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from __future__ import annotations
2+
3+
import re
4+
import tomllib
5+
from pathlib import Path
6+
7+
8+
ROOT = Path(__file__).resolve().parents[1]
9+
10+
11+
def pyproject_python_versions() -> list[str]:
12+
data = tomllib.loads((ROOT / "pyproject.toml").read_text())
13+
classifiers = data["project"]["classifiers"]
14+
return sorted(
15+
match.group(1)
16+
for classifier in classifiers
17+
if (match := re.fullmatch(r"Programming Language :: Python :: (3\.\d+)", classifier))
18+
)
19+
20+
21+
def workflow_python_versions() -> list[str]:
22+
workflow = (ROOT / ".github/workflows/ci.yml").read_text()
23+
return sorted(set(re.findall(r'- "(3\.\d+)"', workflow)))
24+
25+
26+
def test_python_version_support_matches_current_bindings() -> None:
27+
expected = ["3.10", "3.11", "3.12", "3.13"]
28+
29+
assert pyproject_python_versions() == expected
30+
assert workflow_python_versions() == expected

0 commit comments

Comments
 (0)