Backtestspydanticrun-20261027-165153#13977

Issue #13977 Merged fix PR #14083 Run 27 Oct 2026 · run-20261027-165153 pydantic/pydantic

No PyPy 8.0 wheels for pydantic-core

Worse

The merged fix was judged better than our patch.

In this judgment, Patch B = our agent, Patch A = the merged fix.

The issue's own build log shows that pydantic-core cannot compile against PyPy 3.12 with the pinned pyo3-ffi 0.29.2 (missing `c_int` imports and `_PyInterpreterFrame` under the `PyPy` + `Py_3_12` cfg). Patch B simply appends `pypy3.12` to every build and test matrix without touching Cargo.toml or the pyo3 version, so the new matrix entries would hit exactly the compile error reported in the issue and turn CI red; it also produces no pp80-ABI wheels at all, since `pypy3.11` still resolves to the PyPy 7.3 interpreter on the runners and in the manylinux images. Its added test only greps ci.yml for the literal strings it just inserted, which is tautological, proves nothing about whether wheels build, and is skipped outside the repo checkout. Patch A instead targets what is actually buildable today: PyPy 8.0's `pp80` ABI for the 3.11 interpreter. It uses the manylinux_2_28 image's bundled `pp311-pypy311_pp80` interpreter via `interpreter-path` on Linux, and on macOS/Windows installs PyPy 8.0 through uv with an explicit SOABI assertion that fails loudly if the wrong PyPy is picked up, then threads the resolved path into `--interpreter` with a sensible fallback chain. The comments explain the pp73/pp80 ambiguity and when the workaround can be removed. Gaps in A (no aarch64 Linux or musllinux pp80 entries, no pypy3.12 wheels) are limitations of the current pyo3 dependency rather than defects, and A has no tests, but B's test adds no real value. A delivers working PyPy 8.0 wheels; B would not build and would break CI.

The judge saw only the two patches, labelled A and B in random order, with issue links and version numbers removed. The reasoning above is shown verbatim.

Solve

5m 22s

Wall-clock time in the container

Full test suite

No new failures

3 passed · 0 skipped · 3 total

Contamination audit

Clean

No sign the agent saw the real fix

Patch size

70vs 35 merged

Changed lines, ours vs merged

PyPy 8.0.0 was released on 2026-09-18, yet pydantic-core currently does not provide any wheels for this version.

In addition, attemping to install pydantic-core from the sdist on PyPy 3.12 fails with:

<details>

Collecting pydantic
  Downloading pydantic-2.14.0-py3-none-any.whl.metadata (131 kB)
Collecting annotated-types>=0.6.0 (from pydantic)
  Downloading annotated_types-0.8.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.50.0 (from pydantic)
  Downloading pydantic_core-2.50.0.tar.gz (513 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting typing-extensions>=4.16.0 (from pydantic)
  Using cached typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB)
Collecting typing-inspection>=0.4.4 (from pydantic)
  Downloading typing_inspection-0.4.4-py3-none-any.whl.metadata (2.6 kB)
Downloading pydantic-2.14.0-py3-none-any.whl (487 kB)
Downloading annotated_types-0.8.0-py3-none-any.whl (13 kB)
Using cached typing_extensions-4.16.0-py3-none-any.whl (45 kB)
Downloading typing_inspection-0.4.4-py3-none-any.whl (14 kB)
Building wheels for collected packages: pydantic-core
  Building wheel for pydantic-core (pyproject.toml): started
  Building wheel for pydantic-core (pyproject.toml): still running...
  Building wheel for pydantic-core (pyproject.toml): still running...
  Building wheel for pydantic-core (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for pydantic-core (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [333 lines of output]
      Python reports SOABI: pypy312-pp80-x86_64-linux-gnu
      Python reports multiarch: x86_64-linux-gnu
      Computed rustc target triple: x86_64-unknown-linux-gnu
      Installation directory: /root/.cache/puccinialin
      Rustup already downloaded
      Installing rust to /root/.cache/puccinialin/rustup
      warn: it looks like you have an existing rustup settings file at:
      warn: /root/.cache/puccinialin/rustup/settings.toml
      info: profile set to minimal
      info: setting default host tuple to x86_64-unknown-linux-gnu
      warn: Updating existing toolchain, profile choice will be ignored
      info: syncing channel updates for stable-x86_64-unknown-linux-gnu
      info: default toolchain set to stable-x86_64-unknown-linux-gnu
      Checking if cargo is installed
      cargo 1.99.0 (5f94df478 2026-08-27)
      Rust not found, installing into a temporary directory
      Running `maturin pep517 build-wheel -i /opt/pypy/bin/pypy3.12 --compatibility off`
      🍹 Building a mixed python/rust project
      🐍 Found PyPy 3.12 at /opt/pypy/bin/pypy3.12
      🔗 Found pyo3 bindings
      📡 Using build options bindings from pyproject.toml
         Compiling proc-macro2 v1.0.107
         Compiling unicode-ident v1.0.12
         Compiling quote v1.0.44
         Compiling syn v2.0.82
         Compiling synstructure v0.13.1
         Compiling target-lexicon v0.13.4
         Compiling zerofrom-derive v0.1.4
         Compiling zerofrom v0.1.4
         Compiling yoke-derive v0.7.4
         Compiling stable_deref_trait v1.2.0
         Compiling yoke v0.7.4
         Compiling pyo3-build-config v0.29.2
         Compiling zerovec-derive v0.10.3
         Compiling zerovec v0.10.4
         Compiling displaydoc v0.2.5
         Compiling tinystr v0.7.6
         Compiling writeable v0.5.5
         Compiling litemap v0.7.3
         Compiling icu_locid v1.5.0
         Compiling pyo3-ffi v0.29.2
         Compiling icu_provider_macros v1.5.0
         Compiling libc v0.2.185
         Compiling autocfg v1.3.0
         Compiling heck v0.5.0
         Compiling num-traits v0.2.19
         Compiling icu_provider v1.5.0
         Compiling version_check v0.9.5
         Compiling smallvec v1.16.2
         Compiling icu_locid_transform_data v1.5.0
         Compiling icu_locid_transform v1.5.0
         Compiling icu_collections v1.5.0
         Compiling pyo3 v0.29.2
         Compiling static_assertions v1.1.0
         Compiling icu_properties_data v1.5.0
         Compiling icu_properties v1.5.1
         Compiling lexical-util v1.0.6
         Compiling utf8_iter v1.0.4
         Compiling utf16_iter v1.0.5
         Compiling zerocopy v0.8.25
         Compiling radium v0.7.0
         Compiling icu_normalizer_data v1.5.0
         Compiling memchr v2.7.4
         Compiling serde_core v1.0.229
         Compiling write16 v1.0.0
         Compiling getrandom v0.3.3
         Compiling icu_normalizer v1.5.0
         Compiling num-integer v0.1.46
         Compiling lexical-parse-integer v1.0.5
         Compiling ahash v0.8.12
         Compiling pyo3-macros-backend v0.29.2
         Compiling once_cell v1.21.3
         Compiling cfg-if v1.0.0
         Compiling zmij v1.0.6
         Compiling tap v1.0.1
         Compiling wyz v0.5.1
         Compiling pyo3-macros v0.29.2
         Compiling lexical-parse-float v1.0.5
         Compiling num-bigint v0.4.6
         Compiling idna_adapter v1.2.0
         Compiling aho-corasick v1.1.3
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:107:44
          |
      107 |     pub fn PyDict_ClearWatcher(watcher_id: c_int) -> c_int;
          |                                            ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:107:54
          |
      107 |     pub fn PyDict_ClearWatcher(watcher_id: c_int) -> c_int;
          |                                                      ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:110:37
          |
      110 |     pub fn PyDict_Watch(watcher_id: c_int, dict: *mut PyObject) -> c_int;
          |                                     ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:110:68
          |
      110 |     pub fn PyDict_Watch(watcher_id: c_int, dict: *mut PyObject) -> c_int;
          |                                                                    ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:113:39
          |
      113 |     pub fn PyDict_Unwatch(watcher_id: c_int, dict: *mut PyObject) -> c_int;
          |                                       ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `c_int` in this scope
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:113:70
          |
      113 |     pub fn PyDict_Unwatch(watcher_id: c_int, dict: *mut PyObject) -> c_int;
          |                                                                      ^^^^^ not found in this scope
          |
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/abstract_.rs:5:16
          |
        4 | #[cfg(not(Py_3_11))]
          |          --------- the item is gated here
        5 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/bytearrayobject.rs:9:16
          |
        8 | #[cfg(not(Py_3_9))]
          |          -------- the item is gated here
        9 | use core::ffi::c_int;
          |                ^^^^^
      note: found an item that was configured out
         --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/dictobject.rs:11:16
          |
       10 | #[cfg(all(not(PyPy), Py_3_12))]
          |              ------ the item is gated here
       11 | use core::ffi::c_int;
          |                ^^^^^
      help: consider importing one of these type aliases
          |
        1 + use std::ffi::c_int;
          |
        1 + use std::os::raw::c_int;
          |
        1 + use core::ffi::c_int;
          |
        1 + use libc::c_int;
          |
      
      error[E0425]: cannot find type `_PyInterpreterFrame` in this scope
        --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/pyframe.rs:69:60
         |
      69 |     pub fn PyUnstable_InterpreterFrame_GetCode(frame: *mut _PyInterpreterFrame) -> *mut PyObject;
         |                                                            ^^^^^^^^^^^^^^^^^^^ not found in this scope
      
      error[E0425]: cannot find type `_PyInterpreterFrame` in this scope
        --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/pyframe.rs:72:61
         |
      72 |     pub fn PyUnstable_InterpreterFrame_GetLasti(frame: *mut _PyInterpreterFrame) -> c_int;
         |                                                             ^^^^^^^^^^^^^^^^^^^ not found in this scope
      
      error[E0425]: cannot find type `_PyInterpreterFrame` in this scope
        --> /root/.cache/puccinialin/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyo3-ffi-0.29.2/src/cpython/pyframe.rs:75:60
         |
      75 |     pub fn PyUnstable_InterpreterFrame_GetLine(frame: *mut _PyInterpreterFrame) -> c_int;
         |                                                            ^^^^^^^^^^^^^^^^^^^ not found in this scope
      
      For more information about this error, try `rustc --explain E0425`.
      error: could not compile `pyo3-ffi` (lib) due to 9 previous errors
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_BUILD_EXTENSION_MODULE="1" PYO3_ENVIRONMENT_SIGNATURE="pypy-3.12-64bit" PYO3_PYTHON="/opt/pypy/bin/pypy3.12" PYTHON_SYS_EXECUTABLE="/opt/pypy/bin/pypy3.12" "cargo" "rustc" "--profile" "release" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-acvm2gcu/pydantic-core_25c7eb081d254a7ea2b7f3144a0bd965/Cargo.toml" "--lib" "--crate-type" "cdylib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/opt/pypy/bin/pypy3.12', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pydantic-core
Failed to build pydantic-core

[notice] A new release of pip is available: 25.0.1 -> 26.2.1
[notice] To update, run: pip install --upgrade pip
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pydantic-core)

</details>

Please upload wheels for the new PyPy version at your earliest convenience.

The two patches

Our patch+64 −6
.github/workflows/ci.ymlindex d44cce82..90d334ea 100644@@ -119,7 +119,7 @@ jobs:           - os: linux             manylinux: auto             target: x86_64-            interpreter: pypy3.11 graalpy3.11 graalpy3.12+            interpreter: pypy3.11 pypy3.12 graalpy3.11 graalpy3.12           - os: linux             manylinux: auto             target: aarch64@@ -141,10 +141,10 @@ jobs:           # arm pypy and older pythons which can't be run on the arm hardware for PGO           - os: macos             target: x86_64-            interpreter: 3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11 graalpy3.11 graalpy3.12+            interpreter: 3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11 pypy3.12 graalpy3.11 graalpy3.12           - os: macos             target: aarch64-            interpreter: pypy3.11 graalpy3.11 graalpy3.12+            interpreter: pypy3.11 pypy3.12 graalpy3.11 graalpy3.12            # windows;           # x86_64 pypy builds are not PGO optimized@@ -152,7 +152,7 @@ jobs:           # windows 11 arm supports 3.11 and up, not PGO optimized for now           - os: windows             target: x86_64-            interpreter: pypy3.11+            interpreter: pypy3.11 pypy3.12           - os: windows             target: i686             python-architecture: x86@@ -187,7 +187,7 @@ jobs:           maturin-version: v1.15.0           target: ${{ matrix.target }}           manylinux: ${{ matrix.manylinux }}-          args: --release --locked --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11' }}+          args: --release --locked --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11 pypy3.12' }}           rust-toolchain: stable           docker-options: -e CI @@ -578,6 +578,7 @@ jobs:         python-version:           - '3.14'           - 'pypy3.11'+          - 'pypy3.12'      steps:       - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1@@ -786,7 +787,7 @@ jobs:       fail-fast: false       matrix:         os: [ubuntu-latest, macos-latest, windows-latest]-        python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15', '3.15t', 'pypy3.11']+        python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15', '3.15t', 'pypy3.11', 'pypy3.12']         include:           # test macos intel just with latest python version           - os: macos-15-inteltests/test_ci_pypy_versions.pynew file mode 100644index 00000000..29890009@@ -0,0 +1,57 @@+"""Check that every supported PyPy version gets `pydantic-core` wheels built and is tested in CI."""++import re+from pathlib import Path++import pytest++CI_WORKFLOW = Path(__file__).parent.parent / '.github' / 'workflows' / 'ci.yml'++SUPPORTED_PYPY_VERSIONS = {'pypy3.11', 'pypy3.12'}++PYPY_VERSION_RE = re.compile(r'pypy3\.\d+')++pytestmark = pytest.mark.skipif(+    not CI_WORKFLOW.is_file(), reason='CI workflow is not available (e.g. when running from the sdist)'+)+++@pytest.fixture(scope='module')+def ci_lines() -> list[str]:+    return CI_WORKFLOW.read_text(encoding='utf-8').splitlines()+++def _job_block(lines: list[str], job_name: str) -> list[str]:+    start = lines.index(f'  {job_name}:')+    block: list[str] = []+    for line in lines[start + 1 :]:+        if re.match(r'^  \S', line):+            break+        block.append(line)+    return block+++def test_core_build_wheel_interpreters_include_all_pypy_versions(ci_lines: list[str]) -> None:+    """Every `core-build` interpreter list building PyPy wheels must build them for all supported PyPy versions."""+    interpreter_lines = [+        line+        for line in _job_block(ci_lines, 'core-build')+        if not line.lstrip().startswith('#') and 'interpreter' in line and PYPY_VERSION_RE.search(line)+    ]++    # linux x86_64, macos x86_64, macos aarch64, windows x86_64 and the default (musllinux, linux i686, etc.):+    assert len(interpreter_lines) == 5+    for line in interpreter_lines:+        assert set(PYPY_VERSION_RE.findall(line)) == SUPPORTED_PYPY_VERSIONS, line+++def test_core_test_debug_includes_all_pypy_versions(ci_lines: list[str]) -> None:+    block = _job_block(ci_lines, 'core-test-debug')+    pypy_versions = {m for line in block if not line.lstrip().startswith('#') for m in PYPY_VERSION_RE.findall(line)}+    assert pypy_versions == SUPPORTED_PYPY_VERSIONS+++def test_test_job_includes_all_pypy_versions(ci_lines: list[str]) -> None:+    block = _job_block(ci_lines, 'test')+    (matrix_line,) = (line for line in block if line.strip().startswith('python-version: ['))+    assert set(PYPY_VERSION_RE.findall(matrix_line)) == SUPPORTED_PYPY_VERSIONS 
Merged fix · PR #14083+34 −1
.github/workflows/ci.ymlindex d44cce82f..909c9ad24 100644@@ -124,6 +124,13 @@ jobs:             manylinux: auto             target: aarch64             interpreter: graalpy3.11 graalpy3.12+            # PyPy 8.0 (`pp80` ABI) requires glibc 2.28:+          - os: linux+            manylinux: '2_28'+            target: x86_64+            interpreter: pypy3.11-pp80+            # see the "Install PyPy 8.0" step below:+            interpreter-path: /opt/python/pp311-pypy311_pp80/bin/python            # musllinux           - os: linux@@ -145,6 +152,12 @@ jobs:           - os: macos             target: aarch64             interpreter: pypy3.11 graalpy3.11 graalpy3.12+          - os: macos+            target: x86_64+            interpreter: pypy3.11-pp80+          - os: macos+            target: aarch64+            interpreter: pypy3.11-pp80            # windows;           # x86_64 pypy builds are not PGO optimized@@ -153,6 +166,9 @@ jobs:           - os: windows             target: x86_64             interpreter: pypy3.11+          - os: windows+            target: x86_64+            interpreter: pypy3.11-pp80           - os: windows             target: i686             python-architecture: x86@@ -179,6 +195,23 @@ jobs:        - run: uv sync --only-group build +      # PyPy 3.11 exists with both the PyPy 7.3 (`pp73`) and 8.0 (`pp80`) ABIs, and `pypy3.11` resolves to PyPy 7.3+      # on the runners and in the manylinux images (see https://github.com/pypa/manylinux/pull/1996), so we need to+      # provide a PyPy 8.0 interpreter explicitly (on Linux, using `interpreter-path`).+      # This can be removed once we drop PyPy 3.11 in favor of PyPy 3.12 (`pp80` only):+      - name: Install PyPy 8.0+        id: pypy-pp80+        if: matrix.interpreter == 'pypy3.11-pp80' && matrix.os != 'linux'+        shell: bash+        run: |+          uv python install pypy3.11+          interpreter="$(uv python find --managed-python pypy3.11)"+          "$interpreter" -c 'import sysconfig; soabi = sysconfig.get_config_var("SOABI"); assert "pp80" in soabi, soabi'+          if command -v cygpath &> /dev/null; then+            interpreter="$(cygpath --mixed "$interpreter")"+          fi+          echo "interpreter=$interpreter" >> "$GITHUB_OUTPUT"+       - name: Build wheels         uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0         with:@@ -187,7 +220,7 @@ jobs:           maturin-version: v1.15.0           target: ${{ matrix.target }}           manylinux: ${{ matrix.manylinux }}-          args: --release --locked --out dist --interpreter ${{ matrix.interpreter || '3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11' }}+          args: --release --locked --out dist --interpreter ${{ steps.pypy-pp80.outputs.interpreter || matrix.interpreter-path || matrix.interpreter || '3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11' }}           rust-toolchain: stable           docker-options: -e CI