diff --git a/.github/workflows/lint-and-fmt.yml b/.github/workflows/lint-and-fmt.yml index 675620d..71db1aa 100644 --- a/.github/workflows/lint-and-fmt.yml +++ b/.github/workflows/lint-and-fmt.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: # Only run linter and formatter on minimum supported Python version - python-version: ['3.8'] + python-version: ['3.10'] architecture: ['x64'] name: lint and fmt - Python ${{ matrix.python-version }} on ${{ matrix.architecture }} steps: @@ -33,6 +33,7 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} cache: 'pip' + allow-prereleases: true - name: Install just uses: extractions/setup-just@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a348b5..4f9f396 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,14 +16,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] target: [x86_64, x86, aarch64] - name: Ubuntu, ${{ matrix.target }}, Python ${{ matrix.python-version }} + name: Ubuntu, ${{ matrix.target }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: 3.x + allow-prereleases: true - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -34,22 +34,22 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-ubuntu-${{ matrix.target }}-${{ matrix.python-version }} + name: wheels-ubuntu-${{ matrix.target }} path: dist windows: runs-on: windows-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] target: [x64, x86] - name: Windows, ${{ matrix.target }}, Python ${{ matrix.python-version }} + name: Windows, ${{ matrix.target }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: 3.x architecture: ${{ matrix.target }} + allow-prereleases: true - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -59,21 +59,21 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-windows-${{ matrix.target }}-${{ matrix.python-version }} + name: wheels-windows-${{ matrix.target }} path: dist macos: runs-on: macos-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] target: [x86_64, aarch64] - name: macOS, ${{ matrix.target }}, Python ${{ matrix.python-version }} + name: macOS, ${{ matrix.target }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python-version }} + python-version: 3.x + allow-prereleases: true - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -83,7 +83,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v4 with: - name: wheels-macos-${{ matrix.target }}-${{ matrix.python-version }} + name: wheels-macos-${{ matrix.target }} path: dist sdist: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 0c4f8e4..e0007af 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] architecture: ['x64'] name: unittest - Python ${{ matrix.python-version }} on ${{ matrix.architecture }} steps: @@ -28,6 +28,7 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} cache: 'pip' + allow-prereleases: true - name: Install just uses: extractions/setup-just@v3 diff --git a/Cargo.lock b/Cargo.lock index c8bde83..a61e0ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "portable-atomic" @@ -77,9 +77,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8970a78afe0628a3e3430376fc5fd76b6b45c4d43360ffd6cdd40bdde72b682a" +checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383" dependencies = [ "indoc", "libc", @@ -94,19 +94,18 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458eb0c55e7ece017adeba38f2248ff3ac615e53660d7c71a238d7d2a01c7598" +checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f" dependencies = [ - "once_cell", "target-lexicon", ] [[package]] name = "pyo3-ffi" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7114fe5457c61b276ab77c5055f206295b812608083644a5c5b2640c3102565c" +checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105" dependencies = [ "libc", "pyo3-build-config", @@ -114,9 +113,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8725c0a622b374d6cb051d11a0983786448f7785336139c3c94f5aa6bef7e50" +checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -126,9 +125,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.25.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4109984c22491085343c05b0dbc54ddc405c3cf7b4374fc533f5c3313a572ccc" +checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf" dependencies = [ "heck", "proc-macro2", diff --git a/pyproject.toml b/pyproject.toml index 2c3df02..d485fe8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "maturin" name = "codespan-reporting" description = "A python binding for codespan-reporting" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.10" authors = [{ name = "Nyakku Shigure", email = "sigure.qaq@gmail.com" }] keywords = ["codespan-reporting"] license = { text = "MIT" } @@ -15,27 +15,27 @@ classifiers = [ "Programming Language :: Rust", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "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 :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] dynamic = ["version"] [project.optional-dependencies] -dev = ["pytest>=7.4.4", "ruff==0.11.13", "pyright>=1.1.293", "build"] +dev = ["pytest>=7.4.4", "ruff==0.13.2", "pyright>=1.1.293", "build"] [tool.pyright] include = ["src", "tests"] -pythonVersion = "3.8" +pythonVersion = "3.10" typeCheckingMode = "strict" [tool.ruff] line-length = 120 -target-version = "py38" +target-version = "py310" [tool.ruff.lint] select = [ diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 349694e..72c92e0 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -9,5 +9,5 @@ name = "codespan_reporting_pyo3" crate-type = ["cdylib"] [dependencies] -pyo3 = "0.25.0" +pyo3 = { version = "0.26.0", features = ["abi3-py310"] } codespan-reporting = "0.12.0" diff --git a/src/codespan_reporting/_core.pyi b/src/codespan_reporting/_core.pyi index 8cbcc8e..6dd7575 100644 --- a/src/codespan_reporting/_core.pyi +++ b/src/codespan_reporting/_core.pyi @@ -1,3 +1,5 @@ +from typing import TypeAlias + # config.rs class Config: def __init__(self) -> None: ... @@ -20,7 +22,7 @@ class LabelStyle: Secondary: LabelStyle SecondaryUnderline: LabelStyle -type FileId = int +FileId: TypeAlias = int class Label: def __init__(