-
Notifications
You must be signed in to change notification settings - Fork 280
Update pyo3 to 0.25.1 and add support for Python 3.14.0b4 #570
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
Conversation
|
Tests pass with |
|
This is working in Fedora to build |
Added the patch here as well though ideally this would be merged upstream and pyo3 would release another version "soonish". |
Thanks! According to PyO3/pyo3#5175 (comment), a prompt new release is planned. |
|
Build error with your branch via |
|
@clin1234 Which platform are you using? That might help reproduce the error. It works fine on my local machine with |
CPython 3.14t Linux x86_64 |
|
@clin1234 Pushed a few more commits to fix |
Builds successfully on my end. |
clin1234
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For PyMutex, would it not be simpler to use std::mem::zeroed() for initializing ob_mutex?
Tbh I just wanted to reuse what's already there. orjson/include/pyo3/pyo3-ffi/src/cpython/lock.rs Lines 11 to 18 in 4b29943
|
I suggested it mainly because of https://github.com/python/cpython/blob/main/Include/cpython/lock.h#L22-L31 and https://docs.python.org/3/c-api/init.html#c.PyMutex |
|
@ijl Saw your commits yesterday. Just wanted to highlight this PR in case you'd like to reuse parts of it. |
|
Hey all, I am waiting on this diff to land. Do we know when this will land? |
|
same here! |
Co-authored-by: ijl <ijl@mailbox.org>
Co-authored-by: ijl <ijl@mailbox.org>
|
Not stale |
|
Not stale |
Awesome, thanks a lot for working on it @ijl! AFAICT this release is looking fine. Testing so far looks good. |
The version bound is Line 55 in 3b03a4a
which would allow Lines 175 to 177 in 3b03a4a
and the vendored crate in |
I've pulled in the latest changes from PyO3 0.25.0 / 0.25.1 and applied the remaining patch from the current master branch again, 27d7e27. As for the other two changes:
PyTupleObject.ob_hashis part of 0.25.0.5ae468a withPyASCIIObject.stateis a bit more complicated. In Don't expose PyASCIIObjectState on Python3.14 and newer PyO3/pyo3#5133 it was decided to no longer exposePyASCIIObjectState. To work around it, I replaced the main uses withPyUnicode_DATA,PyUnicode_GET_LENGTH, andPyUnicode_KINDas well as usingunicode_to_str_via_ffiunconditionally on Python 3.14.Additional changes were necessary for
_Py_IsImmortalwhich was made private in PyO3/pyo3#4811 and_PyDict_SetItem_KnownHash_LockHeldwhich isn't part of PyO3.Fixes #569