From 138eb3459c72b56fe10fd72e97c4cdbac2065a1a Mon Sep 17 00:00:00 2001 From: Evan McKinney Date: Mon, 9 Nov 2026 12:38:18 -0500 Subject: [PATCH] build: move to Python 3.15, Rust 1.99, PyO3 0.30 and latest actions/hooks --- .devcontainer/Dockerfile | 2 +- .github/CONTRIBUTING.md | 4 ++-- .github/workflows/bootstrap.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/docs.yml | 6 +++--- .github/workflows/publish-image.yml | 2 +- .github/workflows/release.yml | 12 +++++------ .pre-commit-config.yaml | 4 ++-- Makefile | 2 +- crates/Cargo.lock | 32 ++++++++++++++--------------- crates/Cargo.toml | 4 ++-- pyproject.toml | 9 ++++---- rust-toolchain.toml | 2 +- template-ARTIFACT.md | 6 +++--- template-README.md | 2 +- 15 files changed, 47 insertions(+), 46 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e9d2f8b..9c1341e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,7 +6,7 @@ # passing tests baked in; published to GHCR by publish-image.yml. # ---- dev: the toolchain a contributor needs -------------------------------- -FROM mcr.microsoft.com/devcontainers/python:3.12 AS dev +FROM mcr.microsoft.com/devcontainers/python:3.15 AS dev USER vscode # No toolchain yet: the first cargo call in the repo installs the version in # rust-toolchain.toml. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f1dd48c..8238a5b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Setup -Development uses Python 3.12 and the Rust version in +Development uses Python 3.15 and the Rust version in [rust-toolchain.toml](../rust-toolchain.toml), which rustup installs automatically. ```sh @@ -13,7 +13,7 @@ make init ### Dev container -`.devcontainer/` defines a toolchain image (Python 3.12 and rustup) that runs +`.devcontainer/` defines a toolchain image (Python 3.15 and rustup) that runs `make init` on create. It works with VS Code Dev Containers, GitHub Codespaces (badge in the README), and other dev-container tools, over Docker, Podman, or the Windows `wslc` runtime (set the extension's "Docker Path" to `wslc`). diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index a5b6510..b17ebc4 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python (for pre-commit + replacement script) uses: actions/setup-python@v7 with: - python-version: '3.12' + python-version: '3.15' cache: pip cache-dependency-path: | **/pyproject.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f046fc..3bb26c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.15" - run: pip install pre-commit --quiet @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.15" cache: pip cache-dependency-path: "**/pyproject.toml" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3752214..7d55004 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.15" cache: pip cache-dependency-path: "**/pyproject.toml" @@ -50,7 +50,7 @@ jobs: - name: Test and build docs run: sphinx-build -d docs/_build/doctrees -b html -W --keep-going docs docs/_build/html - - uses: actions/upload-pages-artifact@v3 + - uses: actions/upload-pages-artifact@v5 if: github.event_name != 'pull_request' with: path: docs/_build/html @@ -70,4 +70,4 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 5a1c14d..dd7bb7d 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v7 - - uses: docker/login-action@v3 + - uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6987de6..8b0b8c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,8 +41,8 @@ jobs: - windows-latest - macos-14 env: - # abi3 (py_limited_api = cp310): one wheel per platform covers 3.10+ - CIBW_BUILD: "cp310-*" + # abi3 (py_limited_api = cp311): one wheel per platform covers 3.11+ + CIBW_BUILD: "cp311-*" CIBW_SKIP: "pp* *-win32 *-musllinux* *_i686" # The first cargo call installs the version in rust-toolchain.toml. CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain none" @@ -56,7 +56,7 @@ jobs: with: workspaces: crates - name: Build wheels - uses: pypa/cibuildwheel@v3.4.0 + uses: pypa/cibuildwheel@v4.3.5 - uses: actions/upload-artifact@v7 with: name: cibw-wheels-${{ matrix.os }} @@ -70,7 +70,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.15" - name: Build sdist run: pipx run build --sdist # The sdist leaves out rust-toolchain.toml, so this builds with the @@ -96,7 +96,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.15" - run: rustup toolchain install # version from rust-toolchain.toml - uses: Swatinem/rust-cache@v2 with: @@ -128,7 +128,7 @@ jobs: path: dist merge-multiple: true - name: Create draft release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: draft: true files: dist/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b960bc..3232453 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/compilerla/conventional-pre-commit - rev: v4.4.0 + rev: v4.5.0 hooks: - id: conventional-pre-commit stages: [commit-msg] @@ -20,7 +20,7 @@ repos: stages: [commit-msg] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.7 + rev: v0.17.4 hooks: - id: ruff-check args: [--fix] diff --git a/Makefile b/Makefile index 094fc84..ea1997c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PYTHON_VERSION = python3.12 +PYTHON_VERSION = python3.15 VENV = .venv UV := $(shell command -v uv 2>/dev/null) diff --git a/crates/Cargo.lock b/crates/Cargo.lock index c715685..a6182b0 100644 --- a/crates/Cargo.lock +++ b/crates/Cargo.lock @@ -17,9 +17,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "libc" -version = "0.2.189" +version = "0.2.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "once_cell" @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.29.3" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655" +checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4" dependencies = [ "libc", "once_cell", @@ -58,18 +58,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.29.3" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb" +checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700" dependencies = [ "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.29.3" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330" +checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4" dependencies = [ "libc", "pyo3-build-config", @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.29.3" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6" +checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -89,9 +89,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.29.3" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3" +checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b" dependencies = [ "heck", "proc-macro2", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.119" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -127,6 +127,6 @@ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" [[package]] name = "unicode-ident" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" diff --git a/crates/Cargo.toml b/crates/Cargo.toml index ca24b0a..90255e4 100644 --- a/crates/Cargo.toml +++ b/crates/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "{{project_name}}_accelerate" edition = "2024" -rust-version = "1.97" +rust-version = "1.99" license = "MIT" publish = false @@ -14,7 +14,7 @@ path = "src/lib.rs" doctest = false [dependencies] -pyo3 = { version = "0.29", features = ["abi3-py310"] } +pyo3 = { version = "0.30", features = ["abi3-py311"] } [features] extension-module = ["pyo3/extension-module"] diff --git a/pyproject.toml b/pyproject.toml index 8660adc..bd01ba3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,13 +9,14 @@ version = "0.1.0" authors = [{ name = "{{author_name}}" }] license = "MIT" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.15", "Programming Language :: Rust", ] dependencies = [ @@ -28,7 +29,7 @@ dependencies = [ include-package-data = false [tool.distutils.bdist_wheel] -py_limited_api = "cp310" +py_limited_api = "cp311" [tool.setuptools.packages.find] where = ["src"] @@ -66,7 +67,7 @@ addopts = "--import-mode=importlib" filterwarnings = ["error"] [tool.ruff] -target-version = "py310" +target-version = "py311" [tool.ruff.lint] select = ["D", "ANN", "F", "I"] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index da82517..b0d5f0b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] # Keep in sync with crates/Cargo.toml's `rust-version`. -channel = "1.97" +channel = "1.99" components = ["rustfmt", "clippy"] profile = "minimal" diff --git a/template-ARTIFACT.md b/template-ARTIFACT.md index 8c8ef20..5619013 100644 --- a/template-ARTIFACT.md +++ b/template-ARTIFACT.md @@ -16,9 +16,9 @@ One paragraph: what the artifact contains and which of the paper's claims it sup | ----- | ----- | | Algorithm | | | Program | | -| Compilation | Rust (version in `rust-toolchain.toml`, installed by `rustup`) via setuptools-rust; Python 3.12 | +| Compilation | Rust (version in `rust-toolchain.toml`, installed by `rustup`) via setuptools-rust; Python 3.15 | | Data set | | -| Run-time environment | Linux; container image (see below) or any host with Python 3.12 + Rust | +| Run-time environment | Linux; container image (see below) or any host with Python 3.15 + Rust | | Hardware | x86-64; no accelerator required | | Metrics | | | Output | | @@ -42,7 +42,7 @@ One paragraph: what the artifact contains and which of the paper's claims it sup ### Software dependencies -Docker (for the container path), or Python 3.12 + `rustup` (for the source path). +Docker (for the container path), or Python 3.15 + `rustup` (for the source path). ## Installation diff --git a/template-README.md b/template-README.md index eaa43b5..3f3d2e8 100644 --- a/template-README.md +++ b/template-README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/{{github_username}}/{{project_name}}/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/{{github_username}}/{{project_name}}/actions/workflows/ci.yml) [![PyPI - Version](https://img.shields.io/pypi/v/{{project_name}})](https://pypi.org/project/{{project_name}}/) -[![Python](https://img.shields.io/badge/Python-3.10%2B-blue?logo=python&logoColor=white)](https://www.python.org/downloads/) +[![Python](https://img.shields.io/badge/Python-3.11%2B-blue?logo=python&logoColor=white)](https://www.python.org/downloads/) [![Docs](https://github.com/{{github_username}}/{{project_name}}/actions/workflows/docs.yml/badge.svg?branch=main)](https://{{github_username}}.github.io/{{project_name}}/) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/{{github_username}}/{{project_name}}/blob/main/src/notebooks/01_main.ipynb) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/{{github_username}}/{{project_name}})