From 80e5e2546356ccc24093a38580defe4be595975b Mon Sep 17 00:00:00 2001 From: Xeonacid Date: Sun, 27 Jul 2025 09:54:20 +0200 Subject: [PATCH 1/5] fix: drop unused riscv64 enable option Fixes #2509 --- bin/generate_schema.py | 1 - cibuildwheel/resources/cibuildwheel.schema.json | 1 - cibuildwheel/selector.py | 1 - 3 files changed, 3 deletions(-) diff --git a/bin/generate_schema.py b/bin/generate_schema.py index fe5f09187..6674dea31 100755 --- a/bin/generate_schema.py +++ b/bin/generate_schema.py @@ -28,7 +28,6 @@ description: How to inherit the parent's value. enable: enum: - - cpython-experimental-riscv64 - cpython-freethreading - cpython-prerelease - graalpy diff --git a/cibuildwheel/resources/cibuildwheel.schema.json b/cibuildwheel/resources/cibuildwheel.schema.json index bae1f9eb5..58086fb56 100644 --- a/cibuildwheel/resources/cibuildwheel.schema.json +++ b/cibuildwheel/resources/cibuildwheel.schema.json @@ -13,7 +13,6 @@ }, "enable": { "enum": [ - "cpython-experimental-riscv64", "cpython-freethreading", "cpython-prerelease", "graalpy", diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index 829e791b5..1bb1d1f56 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -29,7 +29,6 @@ class EnableGroup(StrEnum): Groups of build selectors that are not enabled by default. """ - CPythonExperimentalRiscV64 = "cpython-experimental-riscv64" CPythonFreeThreading = "cpython-freethreading" CPythonPrerelease = "cpython-prerelease" GraalPy = "graalpy" From d16fda12431c693a51ce0103cc106bac7063ca76 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 31 Aug 2025 12:04:47 +0200 Subject: [PATCH 2/5] drop warning on unused riscv64 enable option --- cibuildwheel/__main__.py | 7 --- cibuildwheel/selector.py | 2 +- unit_test/main_tests/main_options_test.py | 65 ----------------------- 3 files changed, 1 insertion(+), 73 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 574e5fcba..fe828784c 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -463,13 +463,6 @@ def detect_warnings(*, options: Options) -> Generator[str, None, None]: build_selector = options.globals.build_selector test_selector = options.globals.test_selector - if EnableGroup.CPythonExperimentalRiscV64 in build_selector.enable: - yield ( - "'cpython-experimental-riscv64' enable is deprecated and will be removed in a future version. " - "It should be removed from tool.cibuildwheel.enable in pyproject.toml " - "or CIBW_ENABLE environment variable." - ) - all_valid_identifiers = [ config.identifier for module in ALL_PLATFORM_MODULES.values() diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index 1bb1d1f56..37dc813a0 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -38,7 +38,7 @@ class EnableGroup(StrEnum): @classmethod def all_groups(cls) -> frozenset["EnableGroup"]: - return frozenset(set(cls) - {cls.CPythonExperimentalRiscV64}) + return frozenset(cls) @classmethod def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]: diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 45cbe0562..7c8a6dde9 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -1,4 +1,3 @@ -import os import sys import tomllib from fnmatch import fnmatch @@ -142,70 +141,6 @@ def test_empty_selector(monkeypatch): assert e.value.code == 3 -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_riscv64_warning1(monkeypatch, capsys): - monkeypatch.setenv("CIBW_ENABLE", "cpython-experimental-riscv64") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-experimental-riscv64' enable is deprecated" in err - - -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_riscv64_warning2(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)] - ) - monkeypatch.setenv("CIBW_ENABLE", "cpython-experimental-riscv64") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-experimental-riscv64' enable is deprecated" in err - - -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_riscv64_no_warning(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)] - ) - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-experimental-riscv64' enable is deprecated" not in err - - -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_riscv64_no_warning2(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313-manylinux_riscv64", str(local_path)] - ) - monkeypatch.setenv("CIBW_ENABLE", "all") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-experimental-riscv64' enable is deprecated" not in err - - @pytest.mark.parametrize( ("architecture", "image", "full_image"), [ From b0c6ef08c22fb57bd368a141036c6661294d87d4 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 6 Dec 2025 16:59:08 +0100 Subject: [PATCH 3/5] deprecation: cp313t Free-Threading Python 3.13 was experimental. Now that Python 3.14 has been released with explicit support, we can schedule removal of Python 3.13 free-threading. --- cibuildwheel/__main__.py | 13 +++-- cibuildwheel/options.py | 2 + cibuildwheel/selector.py | 2 +- test/test_abi_variants.py | 6 +-- unit_test/get_platform_test.py | 2 +- unit_test/main_tests/main_options_test.py | 64 +++++++++++++++++++++++ 6 files changed, 79 insertions(+), 10 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index bb253288f..cc1f356cd 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -432,11 +432,7 @@ def print_preamble(platform: str, options: Options, identifiers: Sequence[str]) def detect_errors(*, options: Options, identifiers: Iterable[str]) -> Generator[str, None, None]: # Check for deprecated CIBW_FREE_THREADED_SUPPORT environment variable if "CIBW_FREE_THREADED_SUPPORT" in os.environ: - yield ( - "CIBW_FREE_THREADED_SUPPORT environment variable is no longer supported. " - 'Use tool.cibuildwheel.enable = ["cpython-freethreading"] in pyproject.toml ' - "or set CIBW_ENABLE=cpython-freethreading instead." - ) + yield "CIBW_FREE_THREADED_SUPPORT environment variable is no longer supported." # Deprecated {python} and {pip} for option_name in ["test_command", "before_build"]: @@ -463,6 +459,13 @@ def detect_warnings(*, options: Options) -> Generator[str, None, None]: build_selector = options.globals.build_selector test_selector = options.globals.test_selector + if EnableGroup.CPythonFreeThreading in build_selector.enable: + yield ( + "'cpython-freethreading' enable is deprecated and will be removed in a future version. " + "It should be removed from tool.cibuildwheel.enable in pyproject.toml " + "or CIBW_ENABLE environment variable." + ) + all_valid_identifiers = [ config.identifier for module in ALL_PLATFORM_MODULES.values() diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index af946a883..eca2eba22 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -686,6 +686,8 @@ def globals(self) -> GlobalOptions: skip_config = "" architectures = Architecture.all_archs(self.platform) enable |= EnableGroup.all_groups() + if args.only.startswith("cp313t-"): + enable.add(EnableGroup.CPythonFreeThreading) build_selector = BuildSelector( build_config=build_config, diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index 53d08b9c5..e49f368db 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -38,7 +38,7 @@ class EnableGroup(StrEnum): @classmethod def all_groups(cls) -> frozenset["EnableGroup"]: - return frozenset(cls) + return frozenset(set(cls) - {cls.CPythonFreeThreading}) @classmethod def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]: diff --git a/test/test_abi_variants.py b/test/test_abi_variants.py index 999323ae0..8534f2793 100644 --- a/test/test_abi_variants.py +++ b/test/test_abi_variants.py @@ -41,7 +41,7 @@ def test_abi3(tmp_path): add_env={ # free_threaded, GraalPy, and PyPy do not have a Py_LIMITED_API equivalent, just build one of those # also limit the number of builds for test performance reasons - "CIBW_BUILD": "cp39-* cp310-* pp310-* gp312_250-* cp312-* cp313t-*", + "CIBW_BUILD": "cp39-* cp310-* pp310-* gp312_250-* cp312-* cp314t-*", "CIBW_ENABLE": "all", }, ) @@ -62,7 +62,7 @@ def test_abi3(tmp_path): python_abi_tags=[ "cp39-cp39", "cp310-abi3", # <-- ABI3, works with 3.10 and 3.12 - "cp313-cp313t", + "cp314-cp314t", "pp310-pypy310_pp73", "graalpy312-graalpy250_312_native", ], @@ -189,7 +189,7 @@ def test_abi_none(tmp_path, capfd): "CIBW_TEST_REQUIRES": "pytest", "CIBW_TEST_COMMAND": f"{utils.invoke_pytest()} {{project}}/test", # limit the number of builds for test performance reasons - "CIBW_BUILD": "cp38-* cp{}{}-* cp313t-* pp310-*".format(*utils.SINGLE_PYTHON_VERSION), + "CIBW_BUILD": "cp38-* cp{}{}-* cp314t-* pp310-*".format(*utils.SINGLE_PYTHON_VERSION), "CIBW_ENABLE": "all", }, ) diff --git a/unit_test/get_platform_test.py b/unit_test/get_platform_test.py index e0c3e42df..aafc9fad0 100644 --- a/unit_test/get_platform_test.py +++ b/unit_test/get_platform_test.py @@ -71,7 +71,7 @@ def test_arm(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: def test_env_set(tmp_path: Path) -> None: environment = {"VSCMD_ARG_TGT_ARCH": "x64"} - configuration = PythonConfiguration(version="irrelevant", identifier="cp313t-win32", url=None) + configuration = PythonConfiguration(version="irrelevant", identifier="cp314t-win32", url=None) with pytest.raises(FatalError, match="VSCMD_ARG_TGT_ARCH"): setup_setuptools_cross_compile(tmp_path, configuration, tmp_path, environment) diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 7c8a6dde9..50212a8ee 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -141,6 +141,70 @@ def test_empty_selector(monkeypatch): assert e.value.code == 3 +@pytest.mark.usefixtures("platform", "intercepted_build_args") +def test_cp313t_warning1(monkeypatch, capsys): + monkeypatch.setenv("CIBW_ENABLE", "cpython-freethreading") + + main() + + _, err = capsys.readouterr() + print(err) + assert "'cpython-freethreading' enable is deprecated" in err + + +@pytest.mark.usefixtures("platform", "intercepted_build_args") +def test_cp313t_warning2(monkeypatch, capsys, tmp_path): + local_path = tmp_path / "tmp_project" + os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already + local_path.joinpath("setup.py").touch() + + monkeypatch.setattr( + sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] + ) + monkeypatch.setenv("CIBW_ENABLE", "cpython-freethreading") + + main() + + _, err = capsys.readouterr() + print(err) + assert "'cpython-freethreading' enable is deprecated" in err + + +@pytest.mark.usefixtures("platform", "intercepted_build_args") +def test_cp313t_warning3(monkeypatch, capsys, tmp_path): + local_path = tmp_path / "tmp_project" + os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already + local_path.joinpath("setup.py").touch() + + monkeypatch.setattr( + sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] + ) + + main() + + _, err = capsys.readouterr() + print(err) + assert "'cpython-freethreading' enable is deprecated" in err + + +@pytest.mark.usefixtures("platform", "intercepted_build_args") +def test_cp313t_warning4(monkeypatch, capsys, tmp_path): + local_path = tmp_path / "tmp_project" + os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already + local_path.joinpath("setup.py").touch() + + monkeypatch.setattr( + sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] + ) + monkeypatch.setenv("CIBW_ENABLE", "all") + + main() + + _, err = capsys.readouterr() + print(err) + assert "'cpython-freethreading' enable is deprecated" in err + + @pytest.mark.parametrize( ("architecture", "image", "full_image"), [ From 5308a76975bb14e8ec81a3cf4bc05bb683290f1d Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 6 Dec 2025 17:01:20 +0100 Subject: [PATCH 4/5] break: remove cp313t --- cibuildwheel/__main__.py | 3 + cibuildwheel/options.py | 2 - cibuildwheel/resources/build-platforms.toml | 20 ------- cibuildwheel/selector.py | 2 - docs/contributing.md | 2 +- docs/options.md | 21 ++----- test/test_0_basic.py | 4 +- test/utils.py | 4 +- unit_test/build_selector_test.py | 8 +-- unit_test/main_tests/main_options_test.py | 61 ++------------------- unit_test/option_prepare_test.py | 6 +- 11 files changed, 20 insertions(+), 113 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index cc1f356cd..100e9a097 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -536,6 +536,9 @@ def check_for_invalid_selectors( if "p36" in selector_ or "p37" in selector_: msg += f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the 2.x series or update `{selector_name}`. " error_type = errors.DeprecationError + if "cp313t" in selector_: + msg += f"cibuildwheel 3.x no longer supports Python 3.13 free-threading. Please use the an older 3.x version or update `{selector_name}`. " + error_type = errors.DeprecationError if selector_name == "build": raise error_type(msg) diff --git a/cibuildwheel/options.py b/cibuildwheel/options.py index eca2eba22..af946a883 100644 --- a/cibuildwheel/options.py +++ b/cibuildwheel/options.py @@ -686,8 +686,6 @@ def globals(self) -> GlobalOptions: skip_config = "" architectures = Architecture.all_archs(self.platform) enable |= EnableGroup.all_groups() - if args.only.startswith("cp313t-"): - enable.add(EnableGroup.CPythonFreeThreading) build_selector = BuildSelector( build_config=build_config, diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index b05ca0314..7d0b7cad3 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -6,7 +6,6 @@ python_configurations = [ { identifier = "cp311-manylinux_x86_64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_x86_64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_x86_64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_x86_64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_x86_64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_x86_64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-manylinux_i686", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -15,7 +14,6 @@ python_configurations = [ { identifier = "cp311-manylinux_i686", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_i686", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_i686", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_i686", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_i686", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_i686", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "pp38-manylinux_x86_64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" }, @@ -30,7 +28,6 @@ python_configurations = [ { identifier = "cp311-manylinux_aarch64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_aarch64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_aarch64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_aarch64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_aarch64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_aarch64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-manylinux_ppc64le", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -39,7 +36,6 @@ python_configurations = [ { identifier = "cp311-manylinux_ppc64le", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_ppc64le", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_ppc64le", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_ppc64le", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_ppc64le", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_ppc64le", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-manylinux_s390x", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -48,7 +44,6 @@ python_configurations = [ { identifier = "cp311-manylinux_s390x", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_s390x", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_s390x", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_s390x", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_s390x", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_s390x", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-manylinux_armv7l", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -57,7 +52,6 @@ python_configurations = [ { identifier = "cp311-manylinux_armv7l", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_armv7l", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_armv7l", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_armv7l", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_armv7l", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_armv7l", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-manylinux_riscv64", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -66,7 +60,6 @@ python_configurations = [ { identifier = "cp311-manylinux_riscv64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-manylinux_riscv64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-manylinux_riscv64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-manylinux_riscv64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-manylinux_riscv64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-manylinux_riscv64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "pp38-manylinux_aarch64", version = "3.8", path_str = "/opt/python/pp38-pypy38_pp73" }, @@ -85,7 +78,6 @@ python_configurations = [ { identifier = "cp311-musllinux_x86_64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_x86_64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_x86_64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_x86_64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_x86_64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_x86_64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_i686", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -94,7 +86,6 @@ python_configurations = [ { identifier = "cp311-musllinux_i686", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_i686", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_i686", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_i686", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_i686", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_i686", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_aarch64", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -103,7 +94,6 @@ python_configurations = [ { identifier = "cp311-musllinux_aarch64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_aarch64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_aarch64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_aarch64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_aarch64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_aarch64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_ppc64le", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -112,7 +102,6 @@ python_configurations = [ { identifier = "cp311-musllinux_ppc64le", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_ppc64le", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_ppc64le", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_ppc64le", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_ppc64le", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_ppc64le", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_s390x", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -121,7 +110,6 @@ python_configurations = [ { identifier = "cp311-musllinux_s390x", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_s390x", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_s390x", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_s390x", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_s390x", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_s390x", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_armv7l", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -130,7 +118,6 @@ python_configurations = [ { identifier = "cp311-musllinux_armv7l", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_armv7l", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_armv7l", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_armv7l", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_armv7l", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_armv7l", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, { identifier = "cp38-musllinux_riscv64", version = "3.8", path_str = "/opt/python/cp38-cp38" }, @@ -139,7 +126,6 @@ python_configurations = [ { identifier = "cp311-musllinux_riscv64", version = "3.11", path_str = "/opt/python/cp311-cp311" }, { identifier = "cp312-musllinux_riscv64", version = "3.12", path_str = "/opt/python/cp312-cp312" }, { identifier = "cp313-musllinux_riscv64", version = "3.13", path_str = "/opt/python/cp313-cp313" }, - { identifier = "cp313t-musllinux_riscv64", version = "3.13", path_str = "/opt/python/cp313-cp313t" }, { identifier = "cp314-musllinux_riscv64", version = "3.14", path_str = "/opt/python/cp314-cp314" }, { identifier = "cp314t-musllinux_riscv64", version = "3.14", path_str = "/opt/python/cp314-cp314t" }, ] @@ -164,9 +150,6 @@ python_configurations = [ { identifier = "cp313-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, { identifier = "cp313-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, { identifier = "cp313-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, - { identifier = "cp313t-macosx_x86_64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, - { identifier = "cp313t-macosx_arm64", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, - { identifier = "cp313t-macosx_universal2", version = "3.13", url = "https://www.python.org/ftp/python/3.13.9/python-3.13.9-macos11.pkg" }, { identifier = "cp314-macosx_x86_64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" }, { identifier = "cp314-macosx_arm64", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" }, { identifier = "cp314-macosx_universal2", version = "3.14", url = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg" }, @@ -200,9 +183,7 @@ python_configurations = [ { identifier = "cp312-win32", version = "3.12.10" }, { identifier = "cp312-win_amd64", version = "3.12.10" }, { identifier = "cp313-win32", version = "3.13.9" }, - { identifier = "cp313t-win32", version = "3.13.9" }, { identifier = "cp313-win_amd64", version = "3.13.9" }, - { identifier = "cp313t-win_amd64", version = "3.13.9" }, { identifier = "cp314-win32", version = "3.14.0" }, { identifier = "cp314t-win32", version = "3.14.0" }, { identifier = "cp314-win_amd64", version = "3.14.0" }, @@ -212,7 +193,6 @@ python_configurations = [ { identifier = "cp311-win_arm64", version = "3.11.9" }, { identifier = "cp312-win_arm64", version = "3.12.10" }, { identifier = "cp313-win_arm64", version = "3.13.9" }, - { identifier = "cp313t-win_arm64", version = "3.13.9" }, { identifier = "cp314-win_arm64", version = "3.14.0" }, { identifier = "cp314t-win_arm64", version = "3.14.0" }, { identifier = "pp38-win_amd64", version = "3.8", url = "https://downloads.python.org/pypy/pypy3.8-v7.3.11-win64.zip" }, diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index e49f368db..8df35b7ce 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -84,8 +84,6 @@ def __call__(self, build_id: str) -> bool: return False # filter out groups that are not enabled - if EnableGroup.CPythonFreeThreading not in self.enable and fnmatch(build_id, "cp313t-*"): - return False if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp315*"): return False is_pypy_eol = fnmatch(build_id, "pp3?-*") or fnmatch(build_id, "pp310-*") diff --git a/docs/contributing.md b/docs/contributing.md index 31c879a79..03b5e67e8 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -82,7 +82,7 @@ A few notes- - Running the macOS integration tests requires _system installs_ of Python from python.org for all the versions that are tested. We won't attempt to install these when running locally, but you can do so manually using the URL in the error message that is printed when the install is not found. -- The ['enable groups'](options.md#enable) run by default are just 'cpython-prerelease' and 'cpython-freethreading'. You can add other groups like pypy or graalpy by passing the `--enable` argument to pytest, i.e. `nox -s tests -- test --enable pypy`. On GitHub PRs, you can add a label to the PR to enable these groups. +- The ['enable groups'](options.md#enable) run by default is just 'cpython-prerelease'. You can add other groups like pypy or graalpy by passing the `--enable` argument to pytest, i.e. `nox -s tests -- test --enable pypy`. On GitHub PRs, you can add a label to the PR to enable these groups. #### Running pytest directly diff --git a/docs/options.md b/docs/options.md index c94cb0424..2962cca03 100644 --- a/docs/options.md +++ b/docs/options.md @@ -59,7 +59,7 @@ When setting the options, you can use shell-style globbing syntax, as per [fnmat | Python 3.10 | cp310-macosx_x86_64
cp310-macosx_universal2
cp310-macosx_arm64 | cp310-win_amd64
cp310-win32
cp310-win_arm64 | cp310-manylinux_x86_64
cp310-manylinux_i686
cp310-musllinux_x86_64
cp310-musllinux_i686 | cp310-manylinux_aarch64
cp310-manylinux_ppc64le
cp310-manylinux_s390x
cp310-manylinux_armv7l
cp310-manylinux_riscv64
cp310-musllinux_aarch64
cp310-musllinux_ppc64le
cp310-musllinux_s390x
cp310-musllinux_armv7l
cp310-musllinux_riscv64 | | | | | Python 3.11 | cp311-macosx_x86_64
cp311-macosx_universal2
cp311-macosx_arm64 | cp311-win_amd64
cp311-win32
cp311-win_arm64 | cp311-manylinux_x86_64
cp311-manylinux_i686
cp311-musllinux_x86_64
cp311-musllinux_i686 | cp311-manylinux_aarch64
cp311-manylinux_ppc64le
cp311-manylinux_s390x
cp311-manylinux_armv7l
cp311-manylinux_riscv64
cp311-musllinux_aarch64
cp311-musllinux_ppc64le
cp311-musllinux_s390x
cp311-musllinux_armv7l
cp311-musllinux_riscv64 | | | | | Python 3.12 | cp312-macosx_x86_64
cp312-macosx_universal2
cp312-macosx_arm64 | cp312-win_amd64
cp312-win32
cp312-win_arm64 | cp312-manylinux_x86_64
cp312-manylinux_i686
cp312-musllinux_x86_64
cp312-musllinux_i686 | cp312-manylinux_aarch64
cp312-manylinux_ppc64le
cp312-manylinux_s390x
cp312-manylinux_armv7l
cp312-manylinux_riscv64
cp312-musllinux_aarch64
cp312-musllinux_ppc64le
cp312-musllinux_s390x
cp312-musllinux_armv7l
cp312-musllinux_riscv64 | | | cp312-pyodide_wasm32 | -| Python 3.13 | cp313-macosx_x86_64
cp313-macosx_universal2
cp313-macosx_arm64

cp313t-macosx_x86_64
cp313t-macosx_universal2
cp313t-macosx_arm64 | cp313-win_amd64
cp313-win32
cp313-win_arm64

cp313t-win_amd64
cp313t-win32
cp313t-win_arm64 | cp313-manylinux_x86_64
cp313-manylinux_i686
cp313-musllinux_x86_64
cp313-musllinux_i686

cp313t-manylinux_x86_64
cp313t-manylinux_i686
cp313t-musllinux_x86_64
cp313t-musllinux_i686 | cp313-manylinux_aarch64
cp313-manylinux_ppc64le
cp313-manylinux_s390x
cp313-manylinux_armv7l
cp313-manylinux_riscv64
cp313-musllinux_aarch64
cp313-musllinux_ppc64le
cp313-musllinux_s390x
cp313-musllinux_armv7l
cp313-musllinux_riscv64

cp313t-manylinux_aarch64
cp313t-manylinux_ppc64le
cp313t-manylinux_s390x
cp313t-manylinux_armv7l
cp313t-manylinux_riscv64
cp313t-musllinux_aarch64
cp313t-musllinux_ppc64le
cp313t-musllinux_s390x
cp313t-musllinux_armv7l
cp313t-musllinux_riscv64 | cp313-android_arm64_v8a
cp313-android_x86_64 | cp313-ios_arm64_iphoneos
cp313-ios_arm64_iphonesimulator
cp313-ios_x86_64_iphonesimulator | cp313-pyodide_wasm32 | +| Python 3.13 | cp313-macosx_x86_64
cp313-macosx_universal2
cp313-macosx_arm64 | cp313-win_amd64
cp313-win32
cp313-win_arm64 | cp313-manylinux_x86_64
cp313-manylinux_i686
cp313-musllinux_x86_64
cp313-musllinux_i686 | cp313-manylinux_aarch64
cp313-manylinux_ppc64le
cp313-manylinux_s390x
cp313-manylinux_armv7l
cp313-manylinux_riscv64
cp313-musllinux_aarch64
cp313-musllinux_ppc64le
cp313-musllinux_s390x
cp313-musllinux_armv7l
cp313-musllinux_riscv64 | cp313-android_arm64_v8a
cp313-android_x86_64 | cp313-ios_arm64_iphoneos
cp313-ios_arm64_iphonesimulator
cp313-ios_x86_64_iphonesimulator | cp313-pyodide_wasm32 | | Python 3.14 | cp314-macosx_x86_64
cp314-macosx_universal2
cp314-macosx_arm64

cp314t-macosx_x86_64
cp314t-macosx_universal2
cp314t-macosx_arm64 | cp314-win_amd64
cp314-win32
cp314-win_arm64

cp314t-win_amd64
cp314t-win32
cp314t-win_arm64 | cp314-manylinux_x86_64
cp314-manylinux_i686
cp314-musllinux_x86_64
cp314-musllinux_i686

cp314t-manylinux_x86_64
cp314t-manylinux_i686
cp314t-musllinux_x86_64
cp314t-musllinux_i686 | cp314-manylinux_aarch64
cp314-manylinux_ppc64le
cp314-manylinux_s390x
cp314-manylinux_armv7l
cp314-manylinux_riscv64
cp314-musllinux_aarch64
cp314-musllinux_ppc64le
cp314-musllinux_s390x
cp314-musllinux_armv7l
cp314-musllinux_riscv64

cp314t-manylinux_aarch64
cp314t-manylinux_ppc64le
cp314t-manylinux_s390x
cp314t-manylinux_armv7l
cp314t-manylinux_riscv64
cp314t-musllinux_aarch64
cp314t-musllinux_ppc64le
cp314t-musllinux_s390x
cp314t-musllinux_armv7l
cp314t-musllinux_riscv64 | cp314-android_arm64_v8a
cp314-android_x86_64 | cp314-ios_arm64_iphoneos
cp314-ios_arm64_iphonesimulator
cp314-ios_x86_64_iphonesimulator | | | PyPy3.8 v7.3 | pp38-macosx_x86_64
pp38-macosx_arm64 | pp38-win_amd64 | pp38-manylinux_x86_64
pp38-manylinux_i686 | pp38-manylinux_aarch64 | | | | | PyPy3.9 v7.3 | pp39-macosx_x86_64
pp39-macosx_arm64 | pp39-win_amd64 | pp39-manylinux_x86_64
pp39-manylinux_i686 | pp39-manylinux_aarch64 | | | | @@ -355,9 +355,6 @@ values are: - `cpython-prerelease`: Enables beta versions of Pythons if any are available (May-July, approximately). -- `cpython-freethreading`: Enable experimental free-threaded builds for CPython 3.13. - Free-threading wheels for 3.14+ are available without this flag, as it's [no - longer considered experimental](https://peps.python.org/pep-0779/). - `pypy`: Enable PyPy. - `pypy-eol`: Enable PyPy versions that have passed end of life (if still available). - `graalpy`: Enable GraalPy. @@ -379,9 +376,7 @@ values are: CPython that can be built without the Global Interpreter Lock (GIL). Those variants are also known as free-threaded / no-gil. The build identifiers for those variants have a `t` suffix in their `python_tag` (e.g. - `cp313t-manylinux_x86_64`). - - Free threading was [experimental in 3.13](https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython), so it required an explicit enable flag. But, as noted above, free-threading doesn't require an enable flag for 3.14+. + `cp314t-manylinux_x86_64`). For more info on building for free-threading, see the [Python Free-Threading Guide](https://py-free-threading.github.io/). @@ -407,9 +402,6 @@ without disabling your other enables. ```toml [tool.cibuildwheel] - # Enable free-threaded support for CPython 3.13 - enable = ["cpython-freethreading"] - # Include all PyPy versions enable = ["pypy", "pypy-eol"] ``` @@ -421,14 +413,11 @@ without disabling your other enables. # Include latest Python beta CIBW_ENABLE: cpython-prerelease - # Include free-threaded support for CPython 3.13 - CIBW_ENABLE: cpython-freethreading - - # Include both - CIBW_ENABLE: cpython-prerelease cpython-freethreading - # Include all PyPy versions CIBW_ENABLE: pypy pypy-eol + + # Include both + CIBW_ENABLE: cpython-prerelease pypy pypy-eol ``` diff --git a/test/test_0_basic.py b/test/test_0_basic.py index 2524d6286..025595e67 100644 --- a/test/test_0_basic.py +++ b/test/test_0_basic.py @@ -67,9 +67,7 @@ def test_sample_build(tmp_path, capfd): logger.step_end() -@pytest.mark.parametrize( - "enable_setting", ["", "cpython-prerelease", "pypy", "cpython-freethreading"] -) +@pytest.mark.parametrize("enable_setting", ["", "cpython-prerelease", "pypy"]) def test_build_identifiers(tmp_path, enable_setting, monkeypatch): project_dir = tmp_path / "project" basic_project.generate(project_dir) diff --git a/test/utils.py b/test/utils.py index 6acdc8044..f3aab1d52 100644 --- a/test/utils.py +++ b/test/utils.py @@ -51,7 +51,7 @@ def get_platform() -> str: raise Exception(msg) -DEFAULT_CIBW_ENABLE = "cpython-freethreading cpython-prerelease" +DEFAULT_CIBW_ENABLE = "cpython-prerelease" def get_enable_groups() -> frozenset[EnableGroup]: @@ -288,8 +288,6 @@ def _expected_wheels( ] enable_groups = get_enable_groups() - if EnableGroup.CPythonFreeThreading in enable_groups: - python_abi_tags.append("cp313-cp313t") if EnableGroup.CPythonPrerelease in enable_groups: ... # Add cp315 here when available diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index af054230b..cbc9061e1 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -52,7 +52,7 @@ def test_build_filter_pre(): assert build_selector("cp313-manylinux_x86_64") assert build_selector("cp37-win_amd64") assert build_selector("cp313-win_amd64") - assert not build_selector("cp313t-manylinux_x86_64") + assert build_selector("cp314t-manylinux_x86_64") def test_build_filter_pypy(): @@ -210,12 +210,6 @@ def test_build_limited_python_patch(): assert build_selector("cp37-manylinux_x86_64") -def test_build_free_threaded_python(): - build_selector = BuildSelector(build_config="*", skip_config="", enable=frozenset(EnableGroup)) - - assert build_selector("cp313t-manylinux_x86_64") - - def test_testing_selector(): # This is not a global import to keep pytest from collecting it as a test test_selector = cibuildwheel.selector.TestSelector(skip_config="cp36-*") diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 50212a8ee..94b6e3f93 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -152,59 +152,6 @@ def test_cp313t_warning1(monkeypatch, capsys): assert "'cpython-freethreading' enable is deprecated" in err -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_cp313t_warning2(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] - ) - monkeypatch.setenv("CIBW_ENABLE", "cpython-freethreading") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-freethreading' enable is deprecated" in err - - -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_cp313t_warning3(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] - ) - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-freethreading' enable is deprecated" in err - - -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_cp313t_warning4(monkeypatch, capsys, tmp_path): - local_path = tmp_path / "tmp_project" - os.mkdir(local_path) # noqa:PTH102 Path.mkdir has been monkeypatched already - local_path.joinpath("setup.py").touch() - - monkeypatch.setattr( - sys, "argv", ["cibuildwheel", "--only", "cp313t-manylinux_x86_64", str(local_path)] - ) - monkeypatch.setenv("CIBW_ENABLE", "all") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-freethreading' enable is deprecated" in err - - @pytest.mark.parametrize( ("architecture", "image", "full_image"), [ @@ -437,6 +384,7 @@ def test_config_settings(platform_specific, platform, intercepted_build_args, mo "?p27*", "?p2*", "?p35*", + "cp313t*", ], ) @pytest.mark.usefixtures("platform", "intercepted_build_args", "allow_empty") @@ -453,8 +401,11 @@ def test_build_selector_deprecated_error(monkeypatch, selector, pattern, capsys) main() stderr = capsys.readouterr().err - series = "2" if "6" in pattern else "1" - msg = f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the {series}.x series or update" + if pattern == "cp313t*": + msg = "cibuildwheel 3.x no longer supports Python 3.13 free-threading. Please use the an older 3.x version or update" + else: + series = "2" if "6" in pattern else "1" + msg = f"cibuildwheel 3.x no longer supports Python < 3.8. Please use the {series}.x series or update" assert msg in stderr diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index e209178a1..4d5164ba9 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -14,7 +14,7 @@ from cibuildwheel.util import file DEFAULT_IDS = {"cp38", "cp39", "cp310", "cp311", "cp312", "cp313", "cp314", "cp314t"} -ALL_IDS = DEFAULT_IDS | {"cp313t", "pp38", "pp39", "pp310", "pp311", "gp311_242", "gp312_250"} +ALL_IDS = DEFAULT_IDS | {"pp38", "pp39", "pp310", "pp311", "gp311_242", "gp312_250"} @pytest.fixture @@ -105,7 +105,7 @@ def test_build_with_override_launches(monkeypatch, tmp_path): [tool.cibuildwheel] manylinux-x86_64-image = "manylinux_2_28" musllinux-x86_64-image = "musllinux_1_2" -enable = ["pypy", "pypy-eol", "graalpy", "cpython-freethreading"] +enable = ["pypy", "pypy-eol", "graalpy"] archs = ["auto64", "auto32"] # Before Python 3.10, use manylinux2014 @@ -154,7 +154,6 @@ def test_build_with_override_launches(monkeypatch, tmp_path): "cp311", "cp312", "cp313", - "cp313t", "cp314", "cp314t", "pp38", @@ -179,7 +178,6 @@ def test_build_with_override_launches(monkeypatch, tmp_path): "cp311", "cp312", "cp313", - "cp313t", "cp314", "cp314t", "pp38", From 8ccf6b29b4a933161b24d228ed3c2ce11b864d8d Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 6 Dec 2025 17:32:04 +0100 Subject: [PATCH 5/5] break: drop unused cpython-freethreading enable option --- bin/generate_schema.py | 1 - cibuildwheel/__main__.py | 7 --- .../resources/cibuildwheel.schema.json | 1 - cibuildwheel/selector.py | 3 +- unit_test/main_tests/main_options_test.py | 11 ----- unit_test/options_test.py | 45 ------------------- 6 files changed, 1 insertion(+), 67 deletions(-) diff --git a/bin/generate_schema.py b/bin/generate_schema.py index e347fce56..2be2bb175 100755 --- a/bin/generate_schema.py +++ b/bin/generate_schema.py @@ -28,7 +28,6 @@ description: How to inherit the parent's value. enable: enum: - - cpython-freethreading - cpython-prerelease - graalpy - pyodide-prerelease diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 100e9a097..cd348c66f 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -459,13 +459,6 @@ def detect_warnings(*, options: Options) -> Generator[str, None, None]: build_selector = options.globals.build_selector test_selector = options.globals.test_selector - if EnableGroup.CPythonFreeThreading in build_selector.enable: - yield ( - "'cpython-freethreading' enable is deprecated and will be removed in a future version. " - "It should be removed from tool.cibuildwheel.enable in pyproject.toml " - "or CIBW_ENABLE environment variable." - ) - all_valid_identifiers = [ config.identifier for module in ALL_PLATFORM_MODULES.values() diff --git a/cibuildwheel/resources/cibuildwheel.schema.json b/cibuildwheel/resources/cibuildwheel.schema.json index c5a27ea8c..cbe069dcb 100644 --- a/cibuildwheel/resources/cibuildwheel.schema.json +++ b/cibuildwheel/resources/cibuildwheel.schema.json @@ -13,7 +13,6 @@ }, "enable": { "enum": [ - "cpython-freethreading", "cpython-prerelease", "graalpy", "pyodide-prerelease", diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index 8df35b7ce..3fe794a84 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -29,7 +29,6 @@ class EnableGroup(StrEnum): Groups of build selectors that are not enabled by default. """ - CPythonFreeThreading = "cpython-freethreading" CPythonPrerelease = "cpython-prerelease" GraalPy = "graalpy" PyPy = "pypy" @@ -38,7 +37,7 @@ class EnableGroup(StrEnum): @classmethod def all_groups(cls) -> frozenset["EnableGroup"]: - return frozenset(set(cls) - {cls.CPythonFreeThreading}) + return frozenset(set(cls)) @classmethod def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]: diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 94b6e3f93..73344f020 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -141,17 +141,6 @@ def test_empty_selector(monkeypatch): assert e.value.code == 3 -@pytest.mark.usefixtures("platform", "intercepted_build_args") -def test_cp313t_warning1(monkeypatch, capsys): - monkeypatch.setenv("CIBW_ENABLE", "cpython-freethreading") - - main() - - _, err = capsys.readouterr() - print(err) - assert "'cpython-freethreading' enable is deprecated" in err - - @pytest.mark.parametrize( ("architecture", "image", "full_image"), [ diff --git a/unit_test/options_test.py b/unit_test/options_test.py index b9847ed5c..e54c6f26c 100644 --- a/unit_test/options_test.py +++ b/unit_test/options_test.py @@ -18,7 +18,6 @@ _get_pinned_container_images, ) from cibuildwheel.platforms import ALL_PLATFORM_MODULES, get_build_identifiers -from cibuildwheel.selector import EnableGroup from cibuildwheel.util import resources from cibuildwheel.util.packaging import DependencyConstraints @@ -439,50 +438,6 @@ def test_override_inherit_environment_with_references(tmp_path: Path) -> None: } -@pytest.mark.parametrize( - ("toml_assignment", "env", "enable_args", "expected_result"), - [ - ("", {}, [], False), - ("enable = ['cpython-freethreading']", {}, [], True), - ("enable = []", {}, [], False), - ("", {}, ["cpython-freethreading"], True), - ("", {}, ["cpython-freethreading", "pypy"], True), - ("", {"CIBW_ENABLE": "pypy"}, [], False), - ("", {"CIBW_ENABLE": "cpython-freethreading"}, [], True), - ("enable = []", {"CIBW_ENABLE": "cpython-freethreading"}, [], True), - ("enable = ['cpython-freethreading']", {"CIBW_ENABLE": "pypy"}, [], True), - ("enable = ['cpython-freethreading']", {}, ["pypy"], True), - ("enable = ['cpython-freethreading']", {"CIBW_ENABLE": ""}, [], True), - ("enable = []", {"CIBW_ENABLE": ""}, [], False), - ], -) -def test_free_threaded_support( - tmp_path: Path, - toml_assignment: str, - env: dict[str, str], - enable_args: list[str], - expected_result: bool, -) -> None: - args = CommandLineArguments.defaults() - args.package_dir = tmp_path - args.enable = enable_args - - pyproject_toml: Path = tmp_path / "pyproject.toml" - pyproject_toml.write_text( - textwrap.dedent( - f"""\ - [tool.cibuildwheel] - {toml_assignment} - """ - ) - ) - options = Options(platform="linux", command_line_arguments=args, env=env) - if expected_result: - assert EnableGroup.CPythonFreeThreading in options.globals.build_selector.enable - else: - assert EnableGroup.CPythonFreeThreading not in options.globals.build_selector.enable - - @pytest.mark.parametrize( ("toml_assignment", "base_file_path", "packages"), [