From 112ff03b80b26abccd52d3a8032d6742a4635a72 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Thu, 20 Aug 2026 07:12:49 +0200 Subject: [PATCH] Update zope.meta templates and declare support for Python 3.15 --- .github/workflows/pre-commit.yml | 2 +- .github/workflows/tests.yml | 155 ++++++++++++++----------------- .meta.toml | 2 +- CHANGES.rst | 2 + pyproject.toml | 2 + 5 files changed, 75 insertions(+), 88 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 3ce4aaa..136dce6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: actions/setup-python@v6 + - uses: actions/setup-python@v7 with: python-version: '3.13' - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bba7fbb..b86e086 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,6 +46,13 @@ on: # Allow to run this workflow manually from the Actions tab workflow_dispatch: +defaults: + run: + # ``pwsh`` propagates only the exit code of the *last* command of a + # multi-command block, so failures on Windows go unnoticed. ``bash`` + # runs with ``-eo pipefail`` and aborts the step on the first failure. + shell: bash + env: # Weirdly, this has to be a top-level key, not ``defaults.env`` PYTHONHASHSEED: 8675309 @@ -105,7 +112,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -115,42 +122,36 @@ jobs: # to save the cache. So it must come before the thing we want to use # the cache. ### - - name: Get pip cache dir (default) - id: pip-cache-default - if: ${{ !startsWith(runner.os, 'Windows') }} + - name: Get pip cache epoch + id: pip-cache-epoch + # ``actions/cache`` never replaces an entry: "if the provided key + # matches an existing cache, a new cache is not created". A corrupt + # entry would therefore break every run that restores it until GitHub + # evicts it. Rotating the key weekly abandons such an entry instead. run: | - echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT + echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT" - - name: Get pip cache dir (Windows) - id: pip-cache-windows - if: ${{ startsWith(runner.os, 'Windows') }} + - name: Get pip cache dir + id: pip-cache run: | - echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - - - name: pip cache (default) - uses: actions/cache@v5 - if: ${{ !startsWith(runner.os, 'Windows') }} - with: - path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - - name: pip cache (Windows) + - name: pip cache uses: actions/cache@v5 - if: ${{ startsWith(runner.os, 'Windows') }} with: - path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}-${{ steps.pip-cache-epoch.outputs.week }} - name: Install Build Dependencies (3.15) if: startsWith(matrix.python-version, '3.15') run: | - pip install -U pip + python -m pip install -U pip pip install -U "setuptools >= 78.1.1,< 82" wheel twine cffi pycparser - name: Install Build Dependencies if: ${{ !startsWith(matrix.python-version, '3.15') }} run: | - pip install -U pip + python -m pip install -U pip pip install -U "setuptools >= 78.1.1,< 82" wheel twine - name: Build AccessControl (macOS x86_64) @@ -207,7 +208,7 @@ jobs: if: ${{ !startsWith(matrix.python-version, '3.15') }} run: | # Install to collect dependencies into the (pip) cache. - pip install -U pip "setuptools >= 78.1.1,< 82" + python -m pip install -U pip "setuptools >= 78.1.1,< 82" pip install .[test] - name: Check AccessControl build @@ -279,7 +280,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -289,31 +290,25 @@ jobs: # to save the cache. So it must come before the thing we want to use # the cache. ### - - name: Get pip cache dir (default) - id: pip-cache-default - if: ${{ !startsWith(runner.os, 'Windows') }} + - name: Get pip cache epoch + id: pip-cache-epoch + # ``actions/cache`` never replaces an entry: "if the provided key + # matches an existing cache, a new cache is not created". A corrupt + # entry would therefore break every run that restores it until GitHub + # evicts it. Rotating the key weekly abandons such an entry instead. run: | - echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT + echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT" - - name: Get pip cache dir (Windows) - id: pip-cache-windows - if: ${{ startsWith(runner.os, 'Windows') }} + - name: Get pip cache dir + id: pip-cache run: | - echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - - - name: pip cache (default) - uses: actions/cache@v5 - if: ${{ !startsWith(runner.os, 'Windows') }} - with: - path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - - name: pip cache (Windows) + - name: pip cache uses: actions/cache@v5 - if: ${{ startsWith(runner.os, 'Windows') }} with: - path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}-${{ steps.pip-cache-epoch.outputs.week }} - name: Download AccessControl wheel (Linux/macOS) if: "!startsWith(runner.os, 'Windows')" @@ -399,7 +394,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -409,31 +404,25 @@ jobs: # to save the cache. So it must come before the thing we want to use # the cache. ### - - name: Get pip cache dir (default) - id: pip-cache-default - if: ${{ !startsWith(runner.os, 'Windows') }} + - name: Get pip cache epoch + id: pip-cache-epoch + # ``actions/cache`` never replaces an entry: "if the provided key + # matches an existing cache, a new cache is not created". A corrupt + # entry would therefore break every run that restores it until GitHub + # evicts it. Rotating the key weekly abandons such an entry instead. run: | - echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT + echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT" - - name: Get pip cache dir (Windows) - id: pip-cache-windows - if: ${{ startsWith(runner.os, 'Windows') }} + - name: Get pip cache dir + id: pip-cache run: | - echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT + echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - - name: pip cache (default) + - name: pip cache uses: actions/cache@v5 - if: ${{ !startsWith(runner.os, 'Windows') }} with: - path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} - - - name: pip cache (Windows) - uses: actions/cache@v5 - if: ${{ startsWith(runner.os, 'Windows') }} - with: - path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }} + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ matrix.python-version }}-${{ steps.pip-cache-epoch.outputs.week }} - name: Download AccessControl wheel uses: actions/download-artifact@v8 @@ -473,7 +462,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -483,35 +472,29 @@ jobs: # to save the cache. So it must come before the thing we want to use # the cache. ### - - name: Get pip cache dir (default) - id: pip-cache-default - if: ${{ !startsWith(runner.os, 'Windows') }} + - name: Get pip cache epoch + id: pip-cache-epoch + # ``actions/cache`` never replaces an entry: "if the provided key + # matches an existing cache, a new cache is not created". A corrupt + # entry would therefore break every run that restores it until GitHub + # evicts it. Rotating the key weekly abandons such an entry instead. run: | - echo "dir=$(pip cache dir)" >>$GITHUB_OUTPUT + echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT" - - name: Get pip cache dir (Windows) - id: pip-cache-windows - if: ${{ startsWith(runner.os, 'Windows') }} + - name: Get pip cache dir + id: pip-cache run: | - echo "dir=$(pip cache dir)" >> $Env:GITHUB_OUTPUT - - - name: pip cache (default) - uses: actions/cache@v5 - if: ${{ !startsWith(runner.os, 'Windows') }} - with: - path: ${{ steps.pip-cache-default.outputs.dir }} - key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }} + echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT" - - name: pip cache (Windows) + - name: pip cache uses: actions/cache@v5 - if: ${{ startsWith(runner.os, 'Windows') }} with: - path: ${{ steps.pip-cache-windows.outputs.dir }} - key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }} + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip_manylinux-${{ matrix.image }}-${{ matrix.python-version }}-${{ steps.pip-cache-epoch.outputs.week }} - name: Update pip - run: pip install -U pip + run: python -m pip install -U pip - name: Build AccessControl if: matrix.image != 'manylinux2014_i686' @@ -537,7 +520,7 @@ jobs: name: manylinux_${{ matrix.image }}_wheels.zip - name: Restore pip cache permissions - run: sudo chown -R $(whoami) ${{ steps.pip-cache-default.outputs.dir }} + run: sudo chown -R $(whoami) ${{ steps.pip-cache.outputs.dir }} - name: Prevent publishing wheels for unreleased Python versions run: VER=$(echo '3.15' | tr -d .) && ls -al wheelhouse && sudo rm -f wheelhouse/*-cp${VER}*.whl && ls -al wheelhouse @@ -582,7 +565,7 @@ jobs: find dist/ -name "*linux_x86_64*" -type f -delete || true - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: skip-existing: true packages-dir: dist/ diff --git a/.meta.toml b/.meta.toml index 99da198..25ecd17 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/src/zope/meta/c-code [meta] template = "c-code" -commit-id = "966ac0d8" +commit-id = "9333ca19" [python] with-windows = true diff --git a/CHANGES.rst b/CHANGES.rst index fcec853..986cf6a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ For changes before version 3.0, see ``HISTORY.rst``. 7.5 (unreleased) ---------------- +- Add final support for Python 3.15. + 7.4 (2026-07-13) ---------------- diff --git a/pyproject.toml b/pyproject.toml index b3fe668..b29adf5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Programming Language :: Python :: Implementation :: CPython", ] dependencies = [ @@ -108,4 +109,5 @@ readme = {file = ["README.rst", "CHANGES.rst"]} [tool.zest-releaser] create-wheel = false +extra-message = "" upload-pypi = false