-
Notifications
You must be signed in to change notification settings - Fork 927
sync pystate.h headers with Python 3.14
#5711
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
|
🎉 looks like CI is finally green here. |
|
I'll try to take a look today. I'm doing other pyo3-ffi stuff right now so all this is fresh for me. |
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.
Looks good. I have some minor suggestions inline but feel free to ignore. I verified that the definitions all follow the CPython headers as of 3.14. There are more changes in 3.15 though 🙈.
pyo3-ffi/src/cpython/pystate.rs
Outdated
| pub(crate) fn _PyThreadState_UncheckedGet() -> *mut PyThreadState; | ||
|
|
||
| // skipped PyThreadState_EnterTracing | ||
| // skipped PyThreadState_LeaveTracing |
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.
why skip these? someone writing a profiler might want this.
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.
Will add 👍
| // skipped private _PyThread_CurrentFrames | ||
|
|
||
| // skipped PyUnstable_ThreadState_SetStackProtection | ||
| // skipped PyUnstable_ThreadState_ResetStackProtection |
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.
Same here - seems reasonable to expose these to me.
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 this one I am going to skip for now, just because "unstable" APIs seem to imply they're more likely to have churn so I'm tempted to wait to take on the maintenance burden until someone asks to use these.
|
Thanks! I guess for the 3.15 changes I can never quite decide when the appropriate "sync" point is. My instinct is that before 3.15.0 we can make changes to the headers to begin accomodating the upcoming version and otherwise the 3.14 headers are the best reference point. |
Part of #5592
Synchronize the
pystatedeclarations with Python 3.14