From 8a12730caf354d49d3aa32e0dfafaf0273fdc7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 9 Oct 2026 15:40:31 -0700 Subject: [PATCH 1/2] feat(python): default to Python 3.15 --- .github/workflows/check.yaml | 4 +- .github/workflows/release.yaml | 2 +- .pre-commit-config.yaml | 3 +- pyproject.toml | 4 +- tests/complex_pre_310.txt | 95 ---------------------------------- tests/test_logic.py | 4 +- tox.toml | 4 ++ 7 files changed, 12 insertions(+), 104 deletions(-) delete mode 100644 tests/complex_pre_310.txt diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 2d443ff..b924b17 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -41,9 +41,9 @@ jobs: cache-dependency-glob: "pyproject.toml" github-token: ${{ secrets.GITHUB_TOKEN }} - name: Install tox - run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv + run: uv tool install --python-preference only-managed --python 3.15 tox --with tox-uv - name: Install Python - if: startsWith(matrix.env, '3.') && matrix.env != '3.14' + if: startsWith(matrix.env, '3.') && matrix.env != '3.15' run: uv python install --python-preference only-managed ${{ matrix.env }} - name: Setup test suite run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 62e434e..21fffd1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: cache-dependency-glob: "pyproject.toml" github-token: ${{ secrets.GITHUB_TOKEN }} - name: Build package - run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist + run: uv build --python 3.15 --python-preference only-managed --sdist --wheel . --out-dir dist - name: Store the distribution packages uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 146c10a..c0fd26b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +default_language_version: + python: python3.15 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 @@ -13,7 +15,6 @@ repos: rev: v2.4.3 hooks: - id: codespell - additional_dependencies: ["tomli>=2.4.1"] - repo: https://github.com/tox-dev/tox-toml-fmt rev: "v1.11.0" hooks: diff --git a/pyproject.toml b/pyproject.toml index e4805ea..98ba589 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ build.targets.sdist.include = [ line-length = 120 [tool.ruff] -target-version = "py310" +target-version = "py311" line-length = 120 format.preview = true format.docstring-code-line-length = 100 @@ -132,7 +132,7 @@ count = true max_supported_python = "3.15" [tool.ty] -environment.python-version = "3.14" +environment.python-version = "3.15" [tool.coverage] run.parallel = true diff --git a/tests/complex_pre_310.txt b/tests/complex_pre_310.txt deleted file mode 100644 index 6c76cbc..0000000 --- a/tests/complex_pre_310.txt +++ /dev/null @@ -1,95 +0,0 @@ -complex - CLI interface -*********************** - -argparse tester - - complex [-h] [--root] [--no-help] [--outdir out_dir] [--in-dir IN_DIR] [--foo | --bar] - {first,f,second,third} ... - - -complex optional arguments -========================== - -* **"-h"**, **"--help"** - show this help message and exit - -* **"--root"** - root flag - -* **"--no-help"** - -* **"--outdir"** "out_dir", **"-o"** "out_dir" - output directory - -* **"--in-dir"** "IN_DIR", **"-i"** "IN_DIR" - input directory - - -complex Exclusive -================= - -this is an exclusive group - -* **"--foo"** - foo - -* **"--bar"** - bar - - -complex first (f) -================= - -a-first-desc - - complex first [-h] [--flag] [--root] one pos_two - - -complex first positional arguments ----------------------------------- - -* **"one"** - first positional argument - -* **"pos_two"** - second positional argument (default: "1") - - -complex first optional arguments --------------------------------- - -* **"-h"**, **"--help"** - show this help message and exit - -* **"--flag"** - a parser first flag - -* **"--root"** - root flag - - -complex second -============== - - complex second [-h] [--flag] [--root] one pos_two - - -complex second positional arguments ------------------------------------ - -* **"one"** - first positional argument - -* **"pos_two"** - second positional argument (default: "green") - - -complex second optional arguments ---------------------------------- - -* **"-h"**, **"--help"** - show this help message and exit - -* **"--flag"** - a parser second flag - -* **"--root"** - root flag - - -complex third -============= - - complex third [-h] - - -complex third optional arguments --------------------------------- - -* **"-h"**, **"--help"** - show this help message and exit - -test epilog diff --git a/tests/test_logic.py b/tests/test_logic.py index 10622da..2c1ceb3 100644 --- a/tests/test_logic.py +++ b/tests/test_logic.py @@ -2,7 +2,6 @@ import os import re -import sys from pathlib import Path from typing import TYPE_CHECKING @@ -55,8 +54,7 @@ def test_basic_as_html(build_outcome: str) -> None: @pytest.mark.sphinx(buildername="text", testroot="complex") def test_complex_as_text(build_outcome: str) -> None: - name = "complex.txt" if sys.version_info >= (3, 10) else "complex_pre_310.txt" - expected = (Path(__file__).parent / name).read_text() + expected = (Path(__file__).parent / "complex.txt").read_text() assert build_outcome == expected diff --git a/tox.toml b/tox.toml index 4f7b62e..db553b5 100644 --- a/tox.toml +++ b/tox.toml @@ -4,6 +4,7 @@ skip_missing_interpreters = true [env_run_base] description = "run the unit tests with pytest under {env_name}" +default_base_python = [ "3.15" ] package = "wheel" wheel_build_env = ".pkg" dependency_groups = [ "test" ] @@ -35,6 +36,9 @@ commands = [ ], ] +[env_pkg_base] +default_base_python = [ "3.15" ] + [env.fix] description = "format the code base to adhere to our styles, and complain about what we cannot do automatically" skip_install = true From 842c4a711197524563882cf859f8aa97a11b6dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 9 Oct 2026 16:14:59 -0700 Subject: [PATCH 2/2] feat(ci): default uv to Python 3.15 --- .github/workflows/check.yaml | 1 + .github/workflows/release.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index b924b17..bfd24dd 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -37,6 +37,7 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 with: + python-version: "3.15" enable-cache: false cache-dependency-glob: "pyproject.toml" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 21fffd1..113d43a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,6 +17,7 @@ jobs: - name: Install the latest version of uv uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 with: + python-version: "3.15" enable-cache: false cache-dependency-glob: "pyproject.toml" github-token: ${{ secrets.GITHUB_TOKEN }}