From acac9ddd7892871d418efa4041807a2b4f31a052 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 26 Jul 2025 14:11:38 +0300 Subject: [PATCH 1/2] Move PyPy 3.10 to pypy-eol --- cibuildwheel/selector.py | 6 ++++-- test/utils.py | 2 +- unit_test/build_selector_test.py | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index 7ada75e30..e9261c05c 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -89,9 +89,11 @@ def __call__(self, build_id: str) -> bool: return False if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp315*"): return False - if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"): + if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp311*"): return False - if EnableGroup.PyPyEoL not in self.enable and fnmatch(build_id, "pp3?-*"): + if EnableGroup.PyPyEoL not in self.enable and ( + fnmatch(build_id, "pp3?-*") or fnmatch(build_id, "pp310-*") + ): return False if EnableGroup.GraalPy not in self.enable and fnmatch(build_id, "gp*"): return False diff --git a/test/utils.py b/test/utils.py index fb45777c9..5172a5a7c 100644 --- a/test/utils.py +++ b/test/utils.py @@ -287,10 +287,10 @@ def _expected_wheels( python_abi_tags += [ "pp38-pypy38_pp73", "pp39-pypy39_pp73", + "pp310-pypy310_pp73", ] if EnableGroup.PyPy in enable_groups: python_abi_tags += [ - "pp310-pypy310_pp73", "pp311-pypy311_pp73", ] diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index d332ebfd5..af054230b 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -16,7 +16,6 @@ def test_build(): assert build_selector("cp312-manylinux_x86_64") assert build_selector("cp313-manylinux_x86_64") assert build_selector("cp314-manylinux_x86_64") - assert build_selector("pp310-manylinux_x86_64") assert build_selector("pp311-manylinux_x86_64") assert build_selector("cp36-manylinux_i686") assert build_selector("cp37-manylinux_i686") @@ -62,8 +61,8 @@ def test_build_filter_pypy(): skip_config="", enable=frozenset([EnableGroup.PyPy]), ) - assert build_selector("pp310-manylinux_x86_64") assert build_selector("pp311-manylinux_x86_64") + assert not build_selector("pp310-manylinux_x86_64") assert not build_selector("pp38-manylinux_x86_64") assert not build_selector("pp39-manylinux_x86_64") @@ -74,8 +73,8 @@ def test_build_filter_pypy_eol(): skip_config="", enable=frozenset([EnableGroup.PyPyEoL]), ) - assert not build_selector("pp310-manylinux_x86_64") assert not build_selector("pp311-manylinux_x86_64") + assert build_selector("pp310-manylinux_x86_64") assert build_selector("pp38-manylinux_x86_64") assert build_selector("pp39-manylinux_x86_64") From 982a1379dc9b02dbeb60dc14d49bbdc12e4f05d4 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:46:45 +0300 Subject: [PATCH 2/2] Refactor PyPy selection --- cibuildwheel/selector.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index e9261c05c..15757611c 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -89,11 +89,11 @@ def __call__(self, build_id: str) -> bool: return False if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp315*"): return False - if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp311*"): + is_pypy_eol = fnmatch(build_id, "pp3?-*") or fnmatch(build_id, "pp310-*") + is_pypy = fnmatch(build_id, "pp*") and not is_pypy_eol + if EnableGroup.PyPy not in self.enable and is_pypy: return False - if EnableGroup.PyPyEoL not in self.enable and ( - fnmatch(build_id, "pp3?-*") or fnmatch(build_id, "pp310-*") - ): + if EnableGroup.PyPyEoL not in self.enable and is_pypy_eol: return False if EnableGroup.GraalPy not in self.enable and fnmatch(build_id, "gp*"): return False