Skip to content

Publish Python 3.14 free-threaded wheels#1612

Merged
mtreinish merged 4 commits into
Qiskit:mainfrom
IvanIsCoding:cibuildwheel-ft
Jun 17, 2026
Merged

Publish Python 3.14 free-threaded wheels#1612
mtreinish merged 4 commits into
Qiskit:mainfrom
IvanIsCoding:cibuildwheel-ft

Conversation

@IvanIsCoding

Copy link
Copy Markdown
Collaborator

Closes #1251

Builds upon #1528. We ship what we test, with the exception of musl versions I guess? Windows is excluded because I'd rather make small steps. 0.18.1 or 0.19.0 can have it all.

I will trigger another PR to test this works

@IvanIsCoding IvanIsCoding added this to the 0.18.0 milestone Jun 17, 2026
@IvanIsCoding IvanIsCoding requested a review from mtreinish June 17, 2026 03:22
@IvanIsCoding IvanIsCoding mentioned this pull request Jun 17, 2026
3 tasks
@IvanIsCoding

Copy link
Copy Markdown
Collaborator Author

We also need this to fix the regular release, I guess. maturin needs quotes due to the versioning.

Comment thread pyproject.toml
before-all = "yum install -y wget && {package}/tools/install_rust.sh"
environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && pipx run abi3audit==0.0.9 --strict --report {wheel}"
repair-wheel-command = 'auditwheel repair -w {dest_dir} {wheel} && if echo "{wheel}" | grep -vq cp314t; then pipx run abi3audit==0.0.9 --strict --report {wheel}; else echo "Skipping abi3audit for free-threaded wheel"; fi'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is perhaps the trickiest part. I wasn't expecting abi3audit to fail with cp314t. This is a work around but I think for 0.18.0 it will do.

It will need to be revisited with 3.15t/abi3t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a bit surprising that abi3audit doesn't just return a non-error and skip if the tags indicate a non-abi3 wheel. It might be because we're using an old version here. The latest release is 0.0.26, 0.0.9 is from 2023 before free threaded builds IIRC. So maybe it just does not understand the 314t tag?

We can revisit this post-release since this won't block anything right now.

@IvanIsCoding

Copy link
Copy Markdown
Collaborator Author

https://github.com/Qiskit/rustworkx/actions/runs/27664585648/job/81815830269 passed, I think this is good to go.

@mtreinish mtreinish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM in it's current form. I think there is some cleanup we can/should do post release but all the wheels are being built correctly so we can visit that post release.

Comment thread pyproject.toml
test-requires = "networkx"
test-command = "python -m unittest discover {project}/tests"
before-build = "pip install -U maturin>=1.9.0,<2.0"
before-build = 'pip install -U "maturin>=1.9.0,<2.0"'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised we need to do this, I would have expected the builder to just pull this in automatically when cibuildwheel goes to build the wheel. It doesn't hurt to do it as an explicit step I guess though.

Comment thread pyproject.toml
before-all = "yum install -y wget && {package}/tools/install_rust.sh"
environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"'
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && pipx run abi3audit==0.0.9 --strict --report {wheel}"
repair-wheel-command = 'auditwheel repair -w {dest_dir} {wheel} && if echo "{wheel}" | grep -vq cp314t; then pipx run abi3audit==0.0.9 --strict --report {wheel}; else echo "Skipping abi3audit for free-threaded wheel"; fi'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a bit surprising that abi3audit doesn't just return a non-error and skip if the tags indicate a non-abi3 wheel. It might be because we're using an old version here. The latest release is 0.0.26, 0.0.9 is from 2023 before free threaded builds IIRC. So maybe it just does not understand the 314t tag?

We can revisit this post-release since this won't block anything right now.

@mtreinish mtreinish added this pull request to the merge queue Jun 17, 2026
Merged via the queue into Qiskit:main with commit e5d4a0e Jun 17, 2026
40 checks passed
@ngoldbaum

Copy link
Copy Markdown

Thanks for getting this done and apologies for never finding the time to review.

@IvanIsCoding

Copy link
Copy Markdown
Collaborator Author

Thanks for getting this done and apologies for never finding the time to review.

No worries, thanks for advancing PyO3 in regards to free-threading compatibility.

I might send you a message asking for what an abi3audit looks like with abi3t. Ideally it all just works out of the box? You don’t maintain the library but it is one of those ecosystem things.

@ngoldbaum

Copy link
Copy Markdown

Honestly I'm not sure offhand. It's a good question though and I'll try to dig in more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test rustworkx with free-threaded Python

3 participants