Python 3.14 Support and Pre-built Wheels#32
Python 3.14 Support and Pre-built Wheels#32padraic-padraic wants to merge 7 commits intotrmue:mainfrom
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. :) |
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
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: |

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.