From 8e1fd4dd36f689b835ce113c116f7cabd20ef296 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Wed, 28 Jan 2026 15:56:01 +0800 Subject: [PATCH 1/2] Expand wheel matrix for Python 3.13/3.14 Add macOS/Windows entries for free-threaded variants. Include distinct artifact suffixes and use explicit maturin interpreter settings. Add manylinux entries for the latest Python versions with similar configurations. --- .github/workflows/build.yml | 91 +++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dc8b96fe..60e6adae1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,8 +74,49 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] - os: [macos-latest, windows-latest] + include: + - os: macos-latest + python-version: "3.10" + artifact-suffix: "" + - os: macos-latest + python-version: "3.11" + artifact-suffix: "" + - os: macos-latest + python-version: "3.12" + artifact-suffix: "" + - os: macos-latest + python-version: "3.13" + artifact-suffix: "" + - os: macos-latest + python-version: "3.14" + artifact-suffix: "" + - os: macos-latest + python-version: "3.13t" + artifact-suffix: "-freethreaded" + - os: macos-latest + python-version: "3.14t" + artifact-suffix: "-freethreaded" + - os: windows-latest + python-version: "3.10" + artifact-suffix: "" + - os: windows-latest + python-version: "3.11" + artifact-suffix: "" + - os: windows-latest + python-version: "3.12" + artifact-suffix: "" + - os: windows-latest + python-version: "3.13" + artifact-suffix: "" + - os: windows-latest + python-version: "3.14" + artifact-suffix: "" + - os: windows-latest + python-version: "3.13t" + artifact-suffix: "-freethreaded" + - os: windows-latest + python-version: "3.14t" + artifact-suffix: "-freethreaded" steps: - uses: actions/checkout@v5 @@ -105,7 +146,7 @@ jobs: - name: Build Python package run: | uv sync --dev --no-install-package datafusion - uv run --no-project maturin build --release --strip --features substrait + uv run --no-project maturin build --release --strip --features substrait --interpreter python - name: List Windows wheels if: matrix.os == 'windows-latest' @@ -121,7 +162,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-${{ matrix.os }} + name: dist-${{ matrix.os }}${{ matrix.artifact-suffix }} path: target/wheels/* build-macos-x86_64: @@ -131,7 +172,21 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + include: + - python-version: "3.10" + artifact-suffix: "" + - python-version: "3.11" + artifact-suffix: "" + - python-version: "3.12" + artifact-suffix: "" + - python-version: "3.13" + artifact-suffix: "" + - python-version: "3.14" + artifact-suffix: "" + - python-version: "3.13t" + artifact-suffix: "-freethreaded" + - python-version: "3.14t" + artifact-suffix: "-freethreaded" steps: - uses: actions/checkout@v5 @@ -161,7 +216,7 @@ jobs: - name: Build Python package run: | uv sync --dev --no-install-package datafusion - uv run --no-project maturin build --release --strip --features substrait + uv run --no-project maturin build --release --strip --features substrait --interpreter python - name: List Mac wheels run: find target/wheels/ @@ -169,13 +224,21 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-macos-aarch64 + name: dist-macos-aarch64${{ matrix.artifact-suffix }} path: target/wheels/* build-manylinux-x86_64: needs: [generate-license] name: Manylinux x86_64 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - interpreter: "3.10 3.11 3.12 3.13 3.14" + artifact-suffix: "" + - interpreter: "3.13t 3.14t" + artifact-suffix: "-freethreaded" steps: - uses: actions/checkout@v5 - run: rm LICENSE.txt @@ -194,17 +257,26 @@ jobs: target: x86_64 manylinux: auto rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 + interpreter: ${{ matrix.interpreter }} args: --release --manylinux 2014 --features protoc,substrait - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-manylinux-x86_64 + name: dist-manylinux-x86_64${{ matrix.artifact-suffix }} path: target/wheels/* build-manylinux-aarch64: needs: [generate-license] name: Manylinux arm64 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - interpreter: "3.10 3.11 3.12 3.13 3.14" + artifact-suffix: "" + - interpreter: "3.13t 3.14t" + artifact-suffix: "-freethreaded" steps: - uses: actions/checkout@v5 - run: rm LICENSE.txt @@ -224,11 +296,12 @@ jobs: # Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail manylinux: 2_28 rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 + interpreter: ${{ matrix.interpreter }} args: --release --features protoc,substrait - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-manylinux-aarch64 + name: dist-manylinux-aarch64${{ matrix.artifact-suffix }} path: target/wheels/* build-sdist: From 6efe8789c92d642bbff2e8b786ffd256a397f437 Mon Sep 17 00:00:00 2001 From: Siew Kam Onn Date: Wed, 28 Jan 2026 15:56:35 +0800 Subject: [PATCH 2/2] Update PyO3 dependency and document wheel rationale Rely on explicit abi3-py310 flag for ABI3 compatibility in the PyO3 dependency feature set while retaining extension-module enabled. Document the rationale for free-threaded 3.13/3.14 wheels alongside ABI3 wheel guidance in the release notes. --- Cargo.toml | 1 - dev/release/README.md | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 364713964..7fe9ee617 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,6 @@ tokio = { version = "1.47", features = [ ] } pyo3 = { version = "0.26", features = [ "extension-module", - "abi3", "abi3-py310", ] } pyo3-async-runtimes = { version = "0.26", features = ["tokio-runtime"] } diff --git a/dev/release/README.md b/dev/release/README.md index 5d2fae5a7..5a76da810 100644 --- a/dev/release/README.md +++ b/dev/release/README.md @@ -130,6 +130,10 @@ datafusion-22.0.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl datafusion-22.0.0-cp37-abi3-win_amd64.whl ``` +Note: PyO3's free-threaded CPython builds (3.13t/3.14t) use a distinct ABI and ignore the `abi3` setting. We keep +the `abi3-py310` feature enabled to preserve the stable-ABI wheels for GIL-enabled Python, and we additionally ship +version-specific `cp313t`/`cp314t` wheels for the free-threaded builds. + Upload the wheels to testpypi. ```bash