Skip to content

build: add Python 3.15 support - #35

Merged
notdodo merged 2 commits into
mainfrom
build/python-3.15
Nov 15, 2026
Merged

notdodo merged 2 commits into
mainfrom
build/python-3.15

Conversation

@notdodo

@notdodo notdodo commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

  • requires-python widened from >=3.13,<3.15 to >=3.13,<3.16; added the Python :: 3.15 classifier.
  • CI matrix now runs 3.13, 3.14, and 3.15.
  • uv.lock relocked; the extra lines are the cp315 wheel entries. No dependency version changes.
  • README and CHANGELOG (Unreleased) updated.

Validation

  • Locally on CPython 3.15.2 with the redaction extra (spaCy and presidio included): mypy strict is clean, and pytest -m "not e2e" --max-warnings=0 passes all 135 tests with no deprecation warnings.
  • task format check test and uv build pass on the default interpreter.

Notes

🤖 Generated with Claude Code

Widen requires-python to <3.16, add the 3.15 classifier and CI matrix
entry, and relock so 3.15 wheels are resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

kics-logo

KICS version: v2.2.1

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 2
Files parsed placeholder 2
Files failed to scan placeholder 0
Total executed queries placeholder 4
Queries failed to execute placeholder 0
Execution time placeholder 0

Queries Results

|
|

Cache `.venv`, `.mypy_cache`, and the uv directory keyed on the Python
version and `uv.lock`, and skip dependency installation on a cache hit,
matching the former DigintLab/github python-ci workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@notdodo
notdodo merged commit 77fe8fa into main Nov 15, 2026
@notdodo
notdodo deleted the build/python-3.15 branch November 15, 2026 09:48
notdodo added a commit that referenced this pull request Nov 15, 2026
## Problem
The `.venv` cache added in #35 breaks CI on any PR whose `uv.lock`
already has a cache entry (#31 is failing because of it):

1. setup-uv's `python-version` only selects the interpreter. The actual
Python download happens during `uv sync`, into `uv-python-dir`, and that
directory wasn't cached.
2. On a cache hit, `.venv` was restored but its interpreter wasn't. `uv
run` logged `Ignoring existing virtual environment linked to
non-existent Python interpreter`, deleted the venv, and recreated it
with only the default groups, dropping the `redaction` extra.
3. "Install dependencies" was skipped because of the hit, so `mypy`
failed with 11 `import-not-found` errors for presidio.

## Fix
- **`cache-python: true` on setup-uv:** the uv-managed interpreter is
cached and restored, so the restored `.venv` links to a Python that
exists.
- **`.venv` and `.mypy_cache` are still cached,** keyed per Python
version and `uv.lock`, as upstream did. The `~/.local/.cache/uv` path is
dropped because it isn't the uv cache directory under setup-uv, which
caches wheels itself.
- **`task install` always runs.** On a valid restored venv it's a no-op
of about a second. If a restore is ever partial, it repairs the venv, so
CI never runs silently without the `redaction` extra.
- **Unchanged:** `uv build` and all action versions.

## Validation
- actionlint and zizmor 1.32.0 pass.
- On GitHub, the first run saves the cache. I'll rerun to confirm the
cache hit: the venv should be reused, there should be no "non-existent
Python interpreter" warning, and the install step should be
near-instant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant