From 91e9648fca8facaa5ff6c040e7ef0263ef5f29cc Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 27 Apr 2026 15:20:18 -0400 Subject: [PATCH 1/2] Add python 3.12-3.14 into "supported" --- .github/workflows/unittests.yml | 2 +- setup.cfg | 3 +++ tox.ini | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 3026ce9..fd6dddb 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: ["3.10", "3.9", "3.8", "3.11"] + python_version: ["3.10", "3.9", "3.8", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest steps: - name: Checkout diff --git a/setup.cfg b/setup.cfg index 9c220d1..7978b8d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,9 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 license_files = LICENSE diff --git a/tox.ini b/tox.ini index 7cb38df..26e9929 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311 +envlist = py38,py39,py310,py311,py312,py313,py314 [testenv] deps = -rrequirements-dev.txt From e410d967dff5acc3149b2ea9111eb71101c9bd0e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 27 Apr 2026 15:36:00 -0400 Subject: [PATCH 2/2] Bump pyupgrade to v3.21.2; pass --keep-runtime-typing v3.15.0 called `tokenize.cookie_re.match()` directly, which crashes on Python 3.14 where cookie_re became a bytes pattern. v3.21.2 ships its own regex. Newer pyupgrade also rewrites `Generator[X, None, None]` -> `Generator[X]` (PEP 696 typevar defaults) when `from __future__ import annotations` is present, which trips pinned mypy v1.6.1 in --strict mode: error: "Generator" expects 3 type arguments, but 1 given [type-arg] `--keep-runtime-typing` disables the rewrite branch in pyupgrade's pep696 plugin (gated on `not state.settings.keep_runtime_typing`), so the existing 3-arg `Generator` annotations stay intact. Co-Authored-By: Claude Code 2.1.119 / Claude Opus 4.7 (1M context) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27fd867..cf38488 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,10 +21,10 @@ repos: - "120" - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.21.2 hooks: - id: pyupgrade - args: ["--py38-plus"] + args: ["--py38-plus", "--keep-runtime-typing"] - repo: https://github.com/pre-commit/mirrors-mypy rev: 'v1.6.1'