maturin icon indicating copy to clipboard operation
maturin copied to clipboard

abi3 wheel generation should choose non-free-threaded interpreter

Open kylebarron opened this issue 2 months ago • 0 comments

Bug Description

Thanks for all your work on maturin!

In my project I have a step:

      - uses: actions/setup-python@v5
        with:
          python-version: |
            3.9
            3.10
            3.11
            3.12
            3.13
            3.13t

      - name: Build abi3-py311 wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.platform.target }}
          args: --release --out dist --features abi3-py311 --features extension-module --manifest-path ${{ matrix.module }}/Cargo.toml
          sccache: "true"

Since there was no error and wheels built successfully, I assumed an abi3 wheel was built. However, I found from a user issue that an abi3 wheel was not built.

Indeed, there was a small warning line:

⚠️ Warning: CPython 3.13t at C:\hostedtoolcache\windows\Python\3.13.8\x64-freethreaded\python.exe does not yet support abi3 so the build artifacts will be version-specific.

I think, for one, it might make sense to error, instead of warn, if the user passes in abi3 parameters but an abi3 wheel wasn't able to be built. And second, in this case, since there are multiple Python versions installed, it would seem possible to choose the non 3.13t executable?

Your maturin version (maturin --version)

v1.9.6

Your Python version (python -V)

3.13t

Your pip version (pip -V)

25.2

What bindings you're using

pyo3

Does cargo build work?

  • [x] Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • [x] Yes

Steps to Reproduce

  1. Fork https://github.com/kylebarron/arro3
  2. Create a new branch from this commit https://github.com/kylebarron/arro3/commit/75f12c96ba19ea4dca68a32e10e8488aaad69864
  3. Run the Python CI wheel build

Or, refer to the CI log here: https://github.com/kylebarron/arro3/actions/runs/18469089462/job/52618268062#step:4:343

kylebarron avatar Oct 13 '25 20:10 kylebarron