-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump supported cpython version to 3.14 for testing #4811
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR. I am not comfortable bumping this check at this point. If we did, unsuspecting users will likely install software built with the next PyO3 version (call it 0.24) when 3.14 stable lands... and they will likely have a terrible experience with random crashes and other frustrating hard-to-debug and dangerous issues. At the same time, I appreciate the desire to get testing with 3.14 and that PyO3 should not be a blocker for this. See #4662 (comment) We also have an undocumented environment variable If you are testing PyO3 with 3.14 you may need to make patches to |
To investigate:
|
@davidhewitt Might need your set of eyeballs, something has changed significantly in regards to 3.14 with strings representation(?) |
This is a great example of the kind of churn which premature 3.14 support will burden us with. The layout of Personally I'm disinterested in fixing it for an alpha which might yet churn again, I suggest just disabling this API on 3.14 with a note that we would prefer not to reintroduce it. |
It's great to test in alphas, but PyO3 probably isn't one of the projects that should do that, at least for the non-stable APIs; we mess with the internals all the time in alphas. I'd wait until the beta freeze (or to at least get close to it) before trying to test 3.14. I also personally don't think PyO3 support for it would help catch too many bugs:
All that said, it might be worth trying to support 3.14 early for the limited API only, because we have to ensure stability for that anyway. I don't know how feasible that is for you guys, though. |
4c94698
to
ab16e04
Compare
CI passes, might need to consolidate commits |
This adds the `Py_3_14` macro for conditional compilation.
Due to python/cpython#128196, data types within `PyASCIIObject.state` have changed, resulting in test failures when building against 3.14.
When `rustc` is invoked, the macro is included with the `--check-cfg` flag, but not with the `--cfg` flag. This caused errors about duplicate definitions to spew out when building with stable Rust toolchains.
This reverts commit 5da57af.
CodSpeed Performance ReportMerging #4811 will not alter performanceComparing Summary
|
Good news! I was able to fix I got part way through updating the FFI for the GIL-disabled build but there have been some pretty substantial changes to refcounting (at least, there might be more) and it's requiring a bit more of a fine-toothed perusal of the headers to make sure everything is right. I'll go ahead and push just the updates for the GIL-enabled build and will come back another day with the GIL-disabled updates as well as some substantial refactoring to reflect upstream refactoring and changes. |
btw, you may want to redo this PR so it isn't from the |
Looking again, I think it's mostly just a refactor? So maybe not so bad. |
(accidentally posted this on the issue instead of here, sorry for the double notification) The last pushes fix ffi-check on the free-threaded build but unfortunately it breaks it on the GIL-enabled build. @davidhewitt it looks like CPython made a change that breaks ffi-check, similar to how it was broken in Python 3.12 - See here inside CPython for what I'm talking about. In ffi-check there's this code you wrote in 2023: pyo3/pyo3-ffi-check/macro/src/lib.rs Lines 148 to 155 in 241080a
Do you happen to know how I should I modify it now that there's an inline struct in the union as well? |
Go ahead |
This is to mainly silence this abominable error: