-
Notifications
You must be signed in to change notification settings - Fork 783
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
Fix _PyFrameEvalFunction
receives an _PyInterpreterFrame
since Python 3.11
#3500
Conversation
_PyFrameEvalFunction
receives an _PyInterpreterFrame
since Python 3.11_PyFrameEvalFunction
receives an _PyInterpreterFrame
since Python 3.11
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.
Thanks! Don't worry about the CI failures; you'll need to rebase once #3498 lands.
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.
main
should now be good again if you want to rebase.
pyo3-ffi/src/cpython/ceval.rs
Outdated
#[cfg(any(PyPy, Py_3_11))] | ||
opaque_struct!(_PyInterpreterFrame); |
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.
It looks like (at least on CPython main) that this symbol resides in cpython/pyframe.h
. Can you please create the corresponding .rs
file and place this there?
pyo3-ffi/src/cpython/pyframe.rs
Outdated
@@ -0,0 +1,2 @@ | |||
#[cfg(any(PyPy, Py_3_11))] |
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.
Is this available in PyPy? I couldn't find anything about it.
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.
I couldn't find it either 😅
I've added #[cfg(not(PyPy))]
to the pub(crate) mod pyframe;
line on src/cpython/mod.rs
because PyPy does not have something like "pyframe.h" in their source code.
Commit: 4931b00
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.
One last thing, can you squash the commits please? 🙂
27da8ff
to
0e0e662
Compare
In Python 3.11 the
_PyFrameEvalFunction
receives a_PyInterpreterFrame
opaque struct.Python 3.11.0 (alpha 7) changelog:
https://docs.python.org/3/whatsnew/changelog.html#id143