diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8803ec4..900bc8e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Run pre-commit run: pipx run pre-commit run --all-files @@ -25,18 +25,18 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - name: Test with pytest run: uv run pytest --cov --cov-report=xml - name: Upload coverage report - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v7 deploy: name: Deploy @@ -49,11 +49,11 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: astral-sh/setup-uv@v6 + - uses: astral-sh/setup-uv@v7 - name: 👷 Build run: uv build --sdist --wheel @@ -61,7 +61,7 @@ jobs: - name: 🚢 Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - uses: softprops/action-gh-release@v2 + - uses: softprops/action-gh-release@v3 with: generate_release_notes: true files: "./dist/*" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3febf9..dc09f0d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ default_install_hook_types: [pre-commit, commit-msg] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -15,14 +15,14 @@ repos: - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.9 + rev: v0.16.9 hooks: - id: ruff args: [--fix, --unsafe-fixes] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v2.3.1 hooks: - id: mypy additional_dependencies: diff --git a/pyproject.toml b/pyproject.toml index 8f2865e..52c2aa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" name = "witty" description = "Well-in-Time Compiler for Cython Modules" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" keywords = [] license = { text = "BSD 3-Clause License" } authors = [ @@ -25,11 +25,12 @@ dependencies = [ classifiers = [ "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.15", "Typing :: Typed", ] @@ -45,7 +46,7 @@ homepage = "https://github.com/funkelab/witty" repository = "https://github.com/funkelab/witty" [tool.ruff] -target-version = "py39" +target-version = "py310" src = ["src"] [tool.ruff.lint] diff --git a/src/witty/compile_module.py b/src/witty/compile_module.py index 4ecec58..4be199c 100644 --- a/src/witty/compile_module.py +++ b/src/witty/compile_module.py @@ -8,11 +8,12 @@ import re import sys import tempfile +from collections.abc import Callable from contextlib import contextmanager from distutils.ccompiler import new_compiler from distutils.command.build_ext import build_ext from pathlib import Path -from typing import TYPE_CHECKING, Any, Callable, Literal +from typing import TYPE_CHECKING, Any, Literal import Cython import nanobind