Skip to content

Commit ef8f088

Browse files
authored
feat: add support for Python 3.15 (#1122)
Adds Python 3.15 to the lint, type check and unit test matrices, uploads unit test coverage from 3.15, and adds the 3.15 classifier. Integration tests run on 3.11 and 3.15. Stacked on #1128, which bumps `impit` to the first release with 3.15 wheels. datamodel-code-generator fails to import on 3.15, so `test_model_generation_pipeline` is skipped there until datamodel-code-generator/datamodel-code-generator#4609 ships. Removing the skip is tracked in #1127. *✍️ Drafted by Claude Code*
1 parent eb9e188 commit ef8f088

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

‎.github/workflows/_checks.yaml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ jobs:
4242
name: Lint check
4343
uses: apify/workflows/.github/workflows/python_lint_check.yaml@main
4444
with:
45-
python_versions: '["3.11", "3.12", "3.13", "3.14"]'
45+
python_versions: '["3.11", "3.12", "3.13", "3.14", "3.15"]'
4646

4747
type_check:
4848
name: Type check
4949
uses: apify/workflows/.github/workflows/python_type_check.yaml@main
5050
with:
51-
python_versions: '["3.11", "3.12", "3.13", "3.14"]'
51+
python_versions: '["3.11", "3.12", "3.13", "3.14", "3.15"]'
5252

5353
docstrings_check:
5454
name: Docstrings check
@@ -159,9 +159,9 @@ jobs:
159159
uses: apify/workflows/.github/workflows/python_unit_tests.yaml@main
160160
secrets: inherit
161161
with:
162-
python_versions: '["3.11", "3.12", "3.13", "3.14"]'
162+
python_versions: '["3.11", "3.12", "3.13", "3.14", "3.15"]'
163163
operating_systems: '["ubuntu-latest", "windows-latest"]'
164-
python_version_for_codecov: "3.14"
164+
python_version_for_codecov: "3.15"
165165
operating_system_for_codecov: ubuntu-latest
166166
tests_concurrency: "16"
167167

@@ -181,7 +181,7 @@ jobs:
181181
strategy:
182182
matrix:
183183
os: ["ubuntu-latest"]
184-
python-version: ["3.11", "3.14"]
184+
python-version: ["3.11", "3.15"]
185185

186186
runs-on: ${{ matrix.os }}
187187

@@ -216,7 +216,7 @@ jobs:
216216
if: >-
217217
${{
218218
matrix.os == 'ubuntu-latest' &&
219-
matrix.python-version == '3.14' &&
219+
matrix.python-version == '3.15' &&
220220
env.CODECOV_TOKEN != ''
221221
}}
222222
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3.12",
2121
"Programming Language :: Python :: 3.13",
2222
"Programming Language :: Python :: 3.14",
23+
"Programming Language :: Python :: 3.15",
2324
"Topic :: Software Development :: Libraries",
2425
]
2526
keywords = ["apify", "api", "client", "automation", "crawling", "scraping"]

‎tests/unit/test_model_generation.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import sys
66
from typing import TYPE_CHECKING
77

8+
import pytest
9+
810
from scripts.postprocess_generated_models import (
911
REPO_ROOT,
1012
RESOURCE_INPUT_TYPEDDICTS,
@@ -56,6 +58,10 @@ def run_datamodel_codegen(*args: str) -> None:
5658
)
5759

5860

61+
@pytest.mark.skipif(
62+
sys.version_info >= (3, 15),
63+
reason='datamodel-code-generator fails to import on Python 3.15 (koxudaxi/datamodel-code-generator#4609)',
64+
)
5965
def test_model_generation_pipeline(tmp_path: Path) -> None:
6066
"""The `generate-models` pipeline (both codegen passes and post-processing) runs on a minimal spec."""
6167
# PR CI never runs `poe generate-models`, so this catches a dependency update that breaks the generator.

0 commit comments

Comments
 (0)