Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ jobs:
with:
python-version: ${{ inputs.python-version }}
architecture: ${{ inputs.python-architecture }}
# PyPy can have FFI changes within Python versions, which creates pain in CI
check-latest: ${{ startsWith(inputs.python-version, 'pypy') }}
check-latest: true

- name: Set up uv
uses: astral-sh/setup-uv@v7
Expand Down
2 changes: 1 addition & 1 deletion pyo3-ffi-check/macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const MACRO_EXCLUSIONS: &[(&str, &str)] = &[
("PyVectorcall_NARGS", "not(Py_3_12)"),
("Py_CLEAR", ""),
("Py_CompileString", "not(Py_3_10)"),
("Py_CompileStringFlags", "all(not(PyPy), not(Py_3_15))"),
("Py_CompileStringFlags", "all(not(PyPy), not(Py_3_13))"),
("Py_DECREF", ""),
("Py_Ellipsis", ""),
("Py_False", ""),
Expand Down
7 changes: 5 additions & 2 deletions pyo3-ffi/src/cpython/pythonrun.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::object::*;
#[cfg(not(any(PyPy, GraalPy, Py_LIMITED_API, Py_3_10)))]
#[cfg(not(any(PyPy, GraalPy, Py_3_10)))]
use crate::pyarena::PyArena;
use crate::PyCompilerFlags;
#[cfg(not(any(PyPy, GraalPy, Py_3_10)))]
Expand Down Expand Up @@ -97,6 +97,10 @@ extern_libpython! {
flags: *mut PyCompilerFlags,
) -> *mut PyObject;

// skipped Py_CompileString - there is a symbol defined for this since Python 3.13
// but the symbol is overridden by a macro definition to call Py_CompileStringExFlags
// inline (see below)

#[cfg(not(any(PyPy, GraalPy)))]
pub fn Py_CompileStringExFlags(
str: *const c_char,
Expand All @@ -105,7 +109,6 @@ extern_libpython! {
flags: *mut PyCompilerFlags,
optimize: c_int,
) -> *mut PyObject;
#[cfg(not(Py_LIMITED_API))]
pub fn Py_CompileStringObject(
str: *const c_char,
filename: *mut PyObject,
Expand Down