Skip to content

Commit c545b2e

Browse files
authored
ci: re-enable ffi check on 3.13 for PyConfig, ignore _PyCoLineInstrumentationData (#5065)
* ci: re-enable ffi check on 3.13 for PyConfig, ignore `_PyCoLineInstrumentationData` * force 3.13 jobs to use latest 3.13.3
1 parent 3caeea5 commit c545b2e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
with:
3434
python-version: ${{ inputs.python-version }}
3535
architecture: ${{ inputs.python-architecture }}
36-
check-latest: ${{ startsWith(inputs.python-version, 'pypy') }} # PyPy can have FFI changes within Python versions, which creates pain in CI
36+
# PyPy can have FFI changes within Python versions, which creates pain in CI
37+
# 3.13.2 also had an ABI break so temporarily add this for 3.13 to ensure that we're using 3.13.3
38+
check-latest: ${{ startsWith(inputs.python-version, 'pypy') || startsWith(inputs.python-version, '3.13') }}
3739

3840
- name: Install nox
3941
run: python -m pip install --upgrade pip && pip install nox

pyo3-ffi-check/macro/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@ pub fn for_all_structs(input: proc_macro::TokenStream) -> proc_macro::TokenStrea
5555
.strip_suffix(".html")
5656
.unwrap();
5757

58-
if struct_name == "PyConfig" && pyo3_build_config::get().version == PY_3_13 {
59-
// https://github.com/python/cpython/issues/130940
60-
// PyConfig has an ABI break on Python 3.13.1 -> 3.13.2, waiting for advice
61-
// how to proceed in PyO3.
58+
if struct_name == "_PyCoLineInstrumentationData"
59+
&& pyo3_build_config::get().version == PY_3_13
60+
{
61+
// private type, fields changed name in 3.13.2 -> 3.13.3
62+
//
63+
// PyO3 0.25 will remove this struct, ignoring temporarily just to unblock CI
64+
// changed, the size stayed the same.
6265
continue;
6366
}
6467

0 commit comments

Comments
 (0)