Python 3.14 Support and Pre-built Wheels#32
Conversation
|
Hi! Thank you for your pull request! Could you merge main into your branch? I am then happy to review. I am generally in favor of supporting Python3.14. :) |
2291500 to
e27db6a
Compare
|
Thank you for taking the time! I've rebased this branch onto the latest main, so it should include your latest changes. |
|
Hmm, over on my own fork I see errors related to the integration with The error message returned is |
|
Actually, found the issue; it seems like it actually is related to a change in |
| let matrix = matrix.call_method1("astype", ("uint8",))?; | ||
|
|
||
| if let Ok(dense) = matrix.downcast::<PyArray2<Bit>>() { | ||
| if let Ok(dense) = matrix.cast::<PyArray2<Bit>>() { |
There was a problem hiding this comment.
Any specific reason why you would want to remove downcast here?
There was a problem hiding this comment.
So this change comes from changes to PyO3, which you can find in the release notes here: https://pyo3.rs/main/migration#from-026-to-027
| stim = [ | ||
| "stim>=1.15", | ||
| "beliefmatching", | ||
| "numpy<2.3" # Resolves type issue in sinter, see https://github.com/quantumlib/Stim/issues/1000. |
|
I am travelling the next two weeks and have limited time to help. But maybe to move things forward, the windows regression test failed, here is the output: |
|
Sorry for only now getting back to you! I think the issue is that Windows+python3.14 is currently not supported for some python modules (pymatching?). Could you try |
Bumps versions of PyO3 and numpy crates, and resolves warning from PyO3 Resolve outstanding deprecation warning
Use dependency-groups for local dev instead
Lightly modified from maturin generate-ci
Missing arguments for musl, limit Python versions for windows
Upstream issue waiting on new release of pymatching
cbec64e to
1886614
Compare
|
No problem at all, I've been busy myself! Yes, it seems that there were some fixes made in the pymatching repo for the windows builds (oscarhiggott/PyMatching@c60642a) but they've not made a new release yet so we still hit the crash for the moment. I've made that tweak, please do let me know if you have any other comments |
|
Thank you for your patience! Merging. :) |

This PR enables running
relay-bpunder Python 3.14, by upgrading the dependencies onnumpyandPyO3.It also adds a workflow to create pre-built Python wheels, based on the example workflow that can be generated using
maturin generate-ci. The file,.github/workflows/release.ymlincludes a step (currently commented out) to allow automatic publishing to PyPI via their 'Trusted Publishing' feature. This would enable researchers to userelay-bpwithout needing a rust toolchain installed.It makes one small additional change, namely removing the
devdependencies from the published package and keeping them for local testing only. Feel free to revert that change if you prefer keeping it as before.