From 394fff6222448f7a24e812e3b216c6958369fdc0 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sun, 3 Aug 2025 23:17:14 +0100 Subject: [PATCH 1/4] Update to zizmor version 1.11.0 --- .github/workflows/build.yml | 8 ++++---- .pre-commit-config.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f07f5e8040acf0..bc2a0e372659db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,8 +178,8 @@ jobs: free-threading: ${{ matrix.free-threading }} build-windows-msi: - name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category - Windows MSI${{ '' }} + # ${{ '' } is a hack to nest jobs under the same sidebar category. + name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation] needs: build-context if: fromJSON(needs.build-context.outputs.run-windows-msi) strategy: @@ -586,8 +586,8 @@ jobs: run: xvfb-run make ci build-san: - name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category - Sanitizers${{ '' }} + # ${{ '' } is a hack to nest jobs under the same sidebar category. + name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation] needs: build-context if: needs.build-context.outputs.run-tests == 'true' strategy: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86410c46d1d707..c4098b8934dde9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,7 +72,7 @@ repos: - id: actionlint - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.6.0 + rev: v1.11.0 hooks: - id: zizmor From 61e2c30a1726796300b2d5c238848069f33ad77c Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sun, 10 Aug 2025 11:05:01 +0100 Subject: [PATCH 2/4] Update all other hooks --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4098b8934dde9..75847815ee5940 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.8 + rev: v0.12.8 hooks: - id: ruff name: Run Ruff (lint) on Doc/ @@ -8,7 +8,7 @@ repos: files: ^Doc/ - id: ruff name: Run Ruff (lint) on Lib/test/ - args: [--exit-non-zero-on-fix] + args: [--exit-non-zero-on-fix, --target-version=py313] files: ^Lib/test/ - id: ruff name: Run Ruff (lint) on Tools/build/ @@ -42,7 +42,7 @@ repos: exclude: ^Tools/c-analyzer/cpython/_parser.py - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -60,7 +60,7 @@ repos: files: '^\.github/CODEOWNERS|\.(gram)$' - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.33.0 + rev: 0.33.2 hooks: - id: check-dependabot - id: check-github-workflows From f90d1692f633a9c3c98a3bb3ef3967d95ca907ae Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sun, 10 Aug 2025 16:48:44 +0100 Subject: [PATCH 3/4] Move target-version from .pre-commit-config to Lib/test/.ruff.toml --- .pre-commit-config.yaml | 2 +- Lib/test/.ruff.toml | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75847815ee5940..d101f5c37e60b1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: files: ^Doc/ - id: ruff name: Run Ruff (lint) on Lib/test/ - args: [--exit-non-zero-on-fix, --target-version=py313] + args: [--exit-non-zero-on-fix] files: ^Lib/test/ - id: ruff name: Run Ruff (lint) on Tools/build/ diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml index f1a967203ce4ba..47f577310f0a27 100644 --- a/Lib/test/.ruff.toml +++ b/Lib/test/.ruff.toml @@ -1,5 +1,7 @@ extend = "../../.ruff.toml" # Inherit the project-wide settings +target-version = "py313" + extend-exclude = [ # Excluded (run with the other AC files in its own separate ruff job in pre-commit) "test_clinic.py", @@ -8,15 +10,17 @@ extend-exclude = [ # Non UTF-8 files "encoded_modules/module_iso_8859_1.py", "encoded_modules/module_koi8_r.py", - # SyntaxError because of t-strings - "test_annotationlib.py", - "test_string/test_templatelib.py", - "test_tstring.py", # New grammar constructions may not yet be recognized by Ruff, # and tests re-use the same names as only the grammar is being checked. "test_grammar.py", ] +[per-file-target-version] +# t-strings +"test_annotationlib.py" = "py314" +"test_string/test_templatelib.py" = "py314" +"test_tstring.py" = "py314" + [lint] select = [ "F401", # Unused import From 15c384b2a65e35126f449052483214eb5cccdc86 Mon Sep 17 00:00:00 2001 From: Malcolm Smith Date: Sun, 10 Aug 2025 23:08:00 +0100 Subject: [PATCH 4/4] Reduce target-version to py312 Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Lib/test/.ruff.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/test/.ruff.toml b/Lib/test/.ruff.toml index 47f577310f0a27..a1b749798fa263 100644 --- a/Lib/test/.ruff.toml +++ b/Lib/test/.ruff.toml @@ -1,6 +1,6 @@ extend = "../../.ruff.toml" # Inherit the project-wide settings -target-version = "py313" +target-version = "py312" extend-exclude = [ # Excluded (run with the other AC files in its own separate ruff job in pre-commit) @@ -16,7 +16,10 @@ extend-exclude = [ ] [per-file-target-version] -# t-strings +# Type parameter defaults +"test_type_params.py" = "py313" + +# Template string literals "test_annotationlib.py" = "py314" "test_string/test_templatelib.py" = "py314" "test_tstring.py" = "py314"