From 3f076ba48761ab9fbce23e185e00f2938910aba2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:57:14 +0300 Subject: [PATCH] Move PyPy 3.10 to pypy-eol (#2521) * Move PyPy 3.10 to pypy-eol * Refactor PyPy selection --- 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 829e791b..73584ca5 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -89,9 +89,11 @@ class BuildSelector: 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*"): + 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?-*"): + 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 diff --git a/test/utils.py b/test/utils.py index fb45777c..5172a5a7 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 d332ebfd..af054230 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")