Visitar URL original
feat: remove GraalPy 3.11 (gp311) support (#2895) · pypa/cibuildwheel@557c5f6 · GitHub
Skip to content

Commit 557c5f6

Browse files
authored
feat: remove GraalPy 3.11 (gp311) support (#2895)
Drops the GraalPy 3.11 / GraalPy 24.2 builds (gp311_242) as agreed in #2741: a ~6-month overlap after the GraalPy 25 (gp312) release. GraalPy 3.12 (gp312_250) stays. This also removes the GraalPy 24-only workarounds that were explicitly marked "Remove when GraalPy 24.x is dropped": - the Visual Studio compiler-discovery (vswhere) and build-isolation (graalpython#491) workarounds in the Windows backend - the issue-491 Windows skip/filter hacks in test_pep518 and test_dependency_versions (added in the original GraalPy PR #1538 and unneeded since GraalPy 25 per #2597) The uv-doesn't-support-graalpy skip (#2754), the `graalpy` enable group, and the generated constraints pins apply to all GraalPy and are kept. Assisted-by: ClaudeCode:claude-opus-4.8
1 parent 70975c2 commit 557c5f6

9 files changed

Lines changed: 3 additions & 102 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ While cibuildwheel itself requires a recent Python version to run (we support th
3434
| PyPy 3.9 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅<sup>1</sup> | N/A | N/A | N/A | N/A | N/A | N/A |
3535
| PyPy 3.10 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅<sup>1</sup> | N/A | N/A | N/A | N/A | N/A | N/A |
3636
| PyPy 3.11 v7.3 | ✅ | ✅ | ✅ | N/A | N/A | ✅<sup>1</sup> | ✅<sup>1</sup> | ✅<sup>1</sup> | N/A | N/A | N/A | N/A | N/A | N/A |
37-
| GraalPy 3.11 v24.2 | ✅ | ✅ | ✅ | N/A | N/A | ✅<sup>1</sup> | N/A | ✅<sup>1</sup> | N/A | N/A | N/A | N/A | N/A | N/A |
3837
| GraalPy 3.12 v25.0 | ✅ | ✅ | ✅ | N/A | N/A | ✅<sup>1</sup> | N/A | ✅<sup>1</sup> | N/A | N/A | N/A | N/A | N/A | N/A |
3938

4039
<sup>**1** PyPy & GraalPy are only supported for manylinux wheels.</sup><br>

‎cibuildwheel/platforms/windows.py‎

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import dataclasses
4-
import json
54
import os
65
import platform as platform_module
76
import shutil
@@ -390,42 +389,6 @@ def setup_python(
390389
setup_setuptools_cross_compile(tmp, python_configuration, python_libs_base, env)
391390
setup_rust_cross_compile(tmp, python_configuration, python_libs_base, env)
392391

393-
if implementation_id.startswith("gp311"):
394-
# GraalPy 24 fails to discover compilers, setup the relevant environment
395-
# variables. Adapted from
396-
# https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt
397-
# Remove when GraalPy 24.x is dropped.
398-
vcpath = call(
399-
Path(os.environ["PROGRAMFILES(X86)"])
400-
/ "Microsoft Visual Studio"
401-
/ "Installer"
402-
/ "vswhere.exe",
403-
"-products",
404-
"*",
405-
"-latest",
406-
"-property",
407-
"installationPath",
408-
capture_stdout=True,
409-
).strip()
410-
log.notice(f"Discovering Visual Studio for GraalPy at {vcpath}")
411-
vcvars_file = tmp / "vcvars.json"
412-
call(
413-
f"{vcpath}\\Common7\\Tools\\vsdevcmd.bat",
414-
"-no_logo",
415-
"-arch=amd64",
416-
"-host_arch=amd64",
417-
"&&",
418-
"python",
419-
"-c",
420-
# this command needs to be one line for Windows reasons
421-
"import sys, json, pathlib, os; pathlib.Path(sys.argv[1]).write_text(json.dumps(dict(os.environ)))",
422-
vcvars_file,
423-
env=env,
424-
)
425-
with open(vcvars_file, encoding="utf-8") as f:
426-
vcvars = json.load(f)
427-
env.update(vcvars)
428-
429392
return base_python, env
430393

431394

@@ -511,22 +474,6 @@ def build(options: Options, tmp_path: Path) -> None:
511474
),
512475
)
513476

514-
if (
515-
config.identifier.startswith("gp311")
516-
and build_frontend.name == "build"
517-
and "--no-isolation" not in extra_flags
518-
and "-n" not in extra_flags
519-
):
520-
# GraalPy 24 fails to discover its standard library when a venv is created
521-
# from a virtualenv seeded executable. See
522-
# https://github.com/oracle/graalpython/issues/491 and remove this once
523-
# GraalPy 24 is dropped.
524-
log.notice(
525-
"Disabling build isolation to workaround GraalPy bug. If the build fails, consider using pip or build[uv] as build frontend."
526-
)
527-
shell("graalpy -m pip install setuptools wheel", env=env)
528-
extra_flags = [*extra_flags, "-n"]
529-
530477
match build_frontend.name:
531478
case "pip":
532479
# Path.resolve() is needed. Without it pip wheel may try to fetch package from pypi.org

‎cibuildwheel/resources/build-platforms.toml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ python_configurations = [
2121
{ identifier = "pp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
2222
{ identifier = "pp310-manylinux_x86_64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
2323
{ identifier = "pp311-manylinux_x86_64", version = "3.11", path_str = "/opt/python/pp311-pypy311_pp73" },
24-
{ identifier = "gp311_242-manylinux_x86_64", version = "3.11", path_str = "/opt/python/graalpy311-graalpy242_311_native" },
2524
{ identifier = "gp312_250-manylinux_x86_64", version = "3.12", path_str = "/opt/python/graalpy312-graalpy250_312_native" },
2625
{ identifier = "cp39-manylinux_aarch64", version = "3.9", path_str = "/opt/python/cp39-cp39" },
2726
{ identifier = "cp310-manylinux_aarch64", version = "3.10", path_str = "/opt/python/cp310-cp310" },
@@ -71,7 +70,6 @@ python_configurations = [
7170
{ identifier = "pp39-manylinux_aarch64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
7271
{ identifier = "pp310-manylinux_aarch64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
7372
{ identifier = "pp311-manylinux_aarch64", version = "3.11", path_str = "/opt/python/pp311-pypy311_pp73" },
74-
{ identifier = "gp311_242-manylinux_aarch64", version = "3.11", path_str = "/opt/python/graalpy311-graalpy242_311_native" },
7573
{ identifier = "gp312_250-manylinux_aarch64", version = "3.12", path_str = "/opt/python/graalpy312-graalpy250_312_native" },
7674
{ identifier = "pp39-manylinux_i686", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" },
7775
{ identifier = "pp310-manylinux_i686", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" },
@@ -176,8 +174,6 @@ python_configurations = [
176174
{ identifier = "pp310-macosx_arm64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.19-macos_arm64.tar.bz2", sha256 = "3db8a03fc496164801646844d7f3b12baa0adb3ad9a0b7cb124521bc2e168a36" },
177175
{ identifier = "pp311-macosx_x86_64", version = "3.11", url = "https://downloads.python.org/pypy/pypy3.11-v7.3.23-macos_x86_64.tar.bz2", sha256 = "c95363c4e87235d11a6cec8128239c291b1eb67a752778fbcfe029a71da82b5e" },
178176
{ identifier = "pp311-macosx_arm64", version = "3.11", url = "https://downloads.python.org/pypy/pypy3.11-v7.3.23-macos_arm64.tar.bz2", sha256 = "4747b3aceba4c1c6104cddc0fe5ea302101d32955f0957347b9ecc4fbd7aed05" },
179-
{ identifier = "gp311_242-macosx_x86_64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-macos-amd64.tar.gz", sha256 = "2f4d5e7dbdf90e38778dfcb8ca3e1ec7eee257ef726b1937d5bc91b54cdddf9b" },
180-
{ identifier = "gp311_242-macosx_arm64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-macos-aarch64.tar.gz", sha256 = "f4a2ae01bae0fa53ec0d19f86d73c6dcc2a162d245552030183b84bfdd8f7635" },
181177
{ identifier = "gp312_250-macosx_x86_64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.1/graalpy-25.0.1-macos-amd64.tar.gz", sha256 = "10b0721d52397f0cc85f038900318da2203711cbcfae7899e3faed49d3dc6221" },
182178
{ identifier = "gp312_250-macosx_arm64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.3/graalpy-25.0.3-macos-aarch64.tar.gz", sha256 = "387d9f5b376860842bea4d55aae5820974f3f3b68fc36c77ae863a061a888857" },
183179
]
@@ -214,7 +210,6 @@ python_configurations = [
214210
{ identifier = "pp39-win_amd64", version = "3.9", url = "https://downloads.python.org/pypy/pypy3.9-v7.3.16-win64.zip", sha256 = "06ec12a5e964dc0ad33e6f380185a4d295178dce6d6df512f508e7aee00a1323" },
215211
{ identifier = "pp310-win_amd64", version = "3.10", url = "https://downloads.python.org/pypy/pypy3.10-v7.3.19-win64.zip", sha256 = "c0d07bba6c8fb4e5804f4a8b3f8ef07cc3d89f6ad1db42a45ffb9be60bbb7cc2" },
216212
{ identifier = "pp311-win_amd64", version = "3.11", url = "https://downloads.python.org/pypy/pypy3.11-v7.3.23-win64.zip", sha256 = "948b8ea58dea5b9917210fe4afd242c788fbfaba1c3f1a25e696a404f703389a" },
217-
{ identifier = "gp311_242-win_amd64", version = "3.11", url = "https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-windows-amd64.zip", sha256 = "9606134284d4d95b2f9d69c3087cd3e9e488f46355b419f5e66588a3281df6a3" },
218213
{ identifier = "gp312_250-win_amd64", version = "3.12", url = "https://github.com/oracle/graalpython/releases/download/graal-25.0.3/graalpy-25.0.3-windows-amd64.zip", sha256 = "2ae5c42b93e08d9e106a017634a3442b272ccae6d08ace157244de0449e937d4" },
219214
]
220215

‎docs/options.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ When setting the options, you can use shell-style globbing syntax, as per [fnmat
6969
| PyPy3.9 v7.3 | pp39-macosx_x86_64<br/>pp39-macosx_arm64 | pp39-win_amd64 | pp39-manylinux_x86_64<br/>pp39-manylinux_i686 | pp39-manylinux_aarch64 | | | |
7070
| PyPy3.10 v7.3 | pp310-macosx_x86_64<br/>pp310-macosx_arm64 | pp310-win_amd64 | pp310-manylinux_x86_64<br/>pp310-manylinux_i686 | pp310-manylinux_aarch64 | | | |
7171
| PyPy3.11 v7.3 | pp311-macosx_x86_64<br/>pp311-macosx_arm64 | pp311-win_amd64 | pp311-manylinux_x86_64<br/>pp311-manylinux_i686 | pp311-manylinux_aarch64 | | | |
72-
| GraalPy 3.11 v24.2 | gp311_242-macosx_x86_64<br/>gp311_242-macosx_arm64 | gp311_242-win_amd64 | gp311_242-manylinux_x86_64 | gp311_242-manylinux_aarch64 | | |
7372
| GraalPy 3.12 v25.0 | gp312_250-macosx_x86_64<br/>gp312_250-macosx_arm64 | gp312_250-win_amd64 | gp312_250-manylinux_x86_64 | gp312_250-manylinux_aarch64 | | |
7473

7574
The list of supported and currently selected build identifiers can also be retrieved by passing the `--print-build-identifiers` flag to cibuildwheel.

‎test/test_dependency_versions.py‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,19 +179,6 @@ def test_dependency_constraints(
179179
msg = f"Unknown method: {method}"
180180
raise ValueError(msg)
181181

182-
skip = ""
183-
184-
if (
185-
utils.get_platform() == "windows"
186-
and method == "file"
187-
and build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] == "build"
188-
):
189-
# GraalPy 24 fails to discover its standard library when a venv is created
190-
# from a virtualenv seeded executable. See
191-
# https://github.com/oracle/graalpython/issues/491 and remove this once
192-
# GraalPy 24 is dropped
193-
skip = "gp311*"
194-
195182
# cross-platform Python script for dependency constraint checks
196183
before_build_script = project_dir / "check_versions.py"
197184
before_build_script.write_text(CHECK_VERSIONS_SCRIPT)
@@ -200,7 +187,6 @@ def test_dependency_constraints(
200187
actual_wheels = utils.cibuildwheel_run(
201188
project_dir,
202189
add_env={
203-
"CIBW_SKIP": skip,
204190
"CIBW_DEPENDENCY_VERSIONS": dependency_version_option,
205191
"CIBW_BEFORE_BUILD": f"python {before_build_script.name}",
206192
"EXPECTED_VERSIONS": json.dumps(tool_versions),
@@ -212,9 +198,4 @@ def test_dependency_constraints(
212198
# also check that we got the right wheels
213199
expected_wheels = utils.expected_wheels("spam", "0.1.0", single_python=True)
214200

215-
if skip == "gp*":
216-
# See reference to https://github.com/oracle/graalpython/issues/491
217-
# above
218-
expected_wheels = [w for w in expected_wheels if "graalpy311" not in w]
219-
220201
assert set(actual_wheels) == set(expected_wheels)

‎test/test_pep518.py‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,12 @@ def test_pep518(tmp_path: Path, build_frontend_env: dict[str, str]) -> None:
4040
project_dir = tmp_path / "project"
4141
basic_project.generate(project_dir)
4242

43-
# GraalPy fails to discover its standard library when a venv is created
44-
# from a virtualenv seeded executable. See
45-
# https://github.com/oracle/graalpython/issues/491 and remove this once
46-
# fixed upstream.
47-
if build_frontend_env["CIBW_BUILD_FRONTEND"] == "build" and utils.get_platform() == "windows":
48-
build_frontend_env["CIBW_SKIP"] = "gp*"
49-
5043
# build the wheels
5144
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=build_frontend_env)
5245

5346
# check that the expected wheels are produced
5447
expected_wheels = utils.expected_wheels("spam", "0.1.0")
5548

56-
# GraalPy fails to discover its standard library when a venv is created
57-
# from a virtualenv seeded executable. See
58-
# https://github.com/oracle/graalpython/issues/491 and remove this once
59-
# fixed upstream.
60-
if build_frontend_env["CIBW_BUILD_FRONTEND"] == "build" and utils.get_platform() == "windows":
61-
expected_wheels = [w for w in expected_wheels if "graalpy" not in w]
62-
6349
assert set(actual_wheels) == set(expected_wheels)
6450

6551
# These checks ensure an extra file is not created when using custom

‎test/utils.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ def _expected_wheels(
319319

320320
if EnableGroup.GraalPy in enable_groups and include_graalpy_in_expected_wheels:
321321
python_abi_tags += [
322-
"graalpy311-graalpy242_311_native",
323322
"graalpy312-graalpy250_312_native",
324323
]
325324

@@ -376,10 +375,7 @@ def _expected_wheels(
376375
else:
377376
min_macosx = _floor_macosx(macosx_deployment_target, "10.15")
378377
elif python_abi_tag.startswith("graalpy"):
379-
if python_abi_tag.startswith("graalpy311"):
380-
min_macosx = macosx_deployment_target
381-
else:
382-
min_macosx = _floor_macosx(macosx_deployment_target, "10.13")
378+
min_macosx = _floor_macosx(macosx_deployment_target, "10.13")
383379
else:
384380
min_macosx = macosx_deployment_target
385381

‎unit_test/build_selector_test.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_build_limited_python() -> None:
199199
assert build_selector("cp37-win32")
200200
assert build_selector("cp38-win32")
201201
assert build_selector("pp37-win_amd64")
202-
assert build_selector("gp311_242-win_amd64")
202+
assert build_selector("gp312_250-win_amd64")
203203

204204

205205
def test_build_limited_python_partial() -> None:

‎unit_test/option_prepare_test.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from cibuildwheel.util import file
1515

1616
DEFAULT_IDS = {"cp39", "cp310", "cp311", "cp312", "cp313", "cp314", "cp314t"}
17-
ALL_IDS = DEFAULT_IDS | {"pp39", "pp310", "pp311", "gp311_242", "gp312_250"}
17+
ALL_IDS = DEFAULT_IDS | {"pp39", "pp310", "pp311", "gp312_250"}
1818

1919

2020
@pytest.fixture
@@ -158,7 +158,6 @@ def test_build_with_override_launches(monkeypatch: pytest.MonkeyPatch, tmp_path:
158158
"pp39",
159159
"pp310",
160160
"pp311",
161-
"gp311_242",
162161
"gp312_250",
163162
}
164163
}
@@ -180,7 +179,6 @@ def test_build_with_override_launches(monkeypatch: pytest.MonkeyPatch, tmp_path:
180179
"pp39",
181180
"pp310",
182181
"pp311",
183-
"gp311_242",
184182
"gp312_250",
185183
]
186184
}

0 commit comments

Comments
 (0)