Skip to content

Commit 12d21bb

Browse files
committed
break: drop unused cpython-freethreading enable option
1 parent 6f20d9f commit 12d21bb

File tree

6 files changed

+1
-67
lines changed

6 files changed

+1
-67
lines changed

bin/generate_schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
description: How to inherit the parent's value.
2929
enable:
3030
enum:
31-
- cpython-freethreading
3231
- cpython-prerelease
3332
- graalpy
3433
- pyodide-prerelease

cibuildwheel/__main__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,6 @@ def detect_warnings(*, options: Options) -> Generator[str, None, None]:
459459
build_selector = options.globals.build_selector
460460
test_selector = options.globals.test_selector
461461

462-
if EnableGroup.CPythonFreeThreading in build_selector.enable:
463-
yield (
464-
"'cpython-freethreading' enable is deprecated and will be removed in a future version. "
465-
"It should be removed from tool.cibuildwheel.enable in pyproject.toml "
466-
"or CIBW_ENABLE environment variable."
467-
)
468-
469462
all_valid_identifiers = [
470463
config.identifier
471464
for module in ALL_PLATFORM_MODULES.values()

cibuildwheel/resources/cibuildwheel.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
},
1414
"enable": {
1515
"enum": [
16-
"cpython-freethreading",
1716
"cpython-prerelease",
1817
"graalpy",
1918
"pyodide-prerelease",

cibuildwheel/selector.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class EnableGroup(StrEnum):
2929
Groups of build selectors that are not enabled by default.
3030
"""
3131

32-
CPythonFreeThreading = "cpython-freethreading"
3332
CPythonPrerelease = "cpython-prerelease"
3433
GraalPy = "graalpy"
3534
PyPy = "pypy"
@@ -38,7 +37,7 @@ class EnableGroup(StrEnum):
3837

3938
@classmethod
4039
def all_groups(cls) -> frozenset["EnableGroup"]:
41-
return frozenset(set(cls) - {cls.CPythonFreeThreading})
40+
return frozenset(set(cls))
4241

4342
@classmethod
4443
def parse_option_value(cls, value: str) -> frozenset["EnableGroup"]:

unit_test/main_tests/main_options_test.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,6 @@ def test_empty_selector(monkeypatch):
141141
assert e.value.code == 3
142142

143143

144-
@pytest.mark.usefixtures("platform", "intercepted_build_args")
145-
def test_cp313t_warning1(monkeypatch, capsys):
146-
monkeypatch.setenv("CIBW_ENABLE", "cpython-freethreading")
147-
148-
main()
149-
150-
_, err = capsys.readouterr()
151-
print(err)
152-
assert "'cpython-freethreading' enable is deprecated" in err
153-
154-
155144
@pytest.mark.parametrize(
156145
("architecture", "image", "full_image"),
157146
[

unit_test/options_test.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
_get_pinned_container_images,
1919
)
2020
from cibuildwheel.platforms import ALL_PLATFORM_MODULES, get_build_identifiers
21-
from cibuildwheel.selector import EnableGroup
2221
from cibuildwheel.util import resources
2322
from cibuildwheel.util.packaging import DependencyConstraints
2423

@@ -439,50 +438,6 @@ def test_override_inherit_environment_with_references(tmp_path: Path) -> None:
439438
}
440439

441440

442-
@pytest.mark.parametrize(
443-
("toml_assignment", "env", "enable_args", "expected_result"),
444-
[
445-
("", {}, [], False),
446-
("enable = ['cpython-freethreading']", {}, [], True),
447-
("enable = []", {}, [], False),
448-
("", {}, ["cpython-freethreading"], True),
449-
("", {}, ["cpython-freethreading", "pypy"], True),
450-
("", {"CIBW_ENABLE": "pypy"}, [], False),
451-
("", {"CIBW_ENABLE": "cpython-freethreading"}, [], True),
452-
("enable = []", {"CIBW_ENABLE": "cpython-freethreading"}, [], True),
453-
("enable = ['cpython-freethreading']", {"CIBW_ENABLE": "pypy"}, [], True),
454-
("enable = ['cpython-freethreading']", {}, ["pypy"], True),
455-
("enable = ['cpython-freethreading']", {"CIBW_ENABLE": ""}, [], True),
456-
("enable = []", {"CIBW_ENABLE": ""}, [], False),
457-
],
458-
)
459-
def test_free_threaded_support(
460-
tmp_path: Path,
461-
toml_assignment: str,
462-
env: dict[str, str],
463-
enable_args: list[str],
464-
expected_result: bool,
465-
) -> None:
466-
args = CommandLineArguments.defaults()
467-
args.package_dir = tmp_path
468-
args.enable = enable_args
469-
470-
pyproject_toml: Path = tmp_path / "pyproject.toml"
471-
pyproject_toml.write_text(
472-
textwrap.dedent(
473-
f"""\
474-
[tool.cibuildwheel]
475-
{toml_assignment}
476-
"""
477-
)
478-
)
479-
options = Options(platform="linux", command_line_arguments=args, env=env)
480-
if expected_result:
481-
assert EnableGroup.CPythonFreeThreading in options.globals.build_selector.enable
482-
else:
483-
assert EnableGroup.CPythonFreeThreading not in options.globals.build_selector.enable
484-
485-
486441
@pytest.mark.parametrize(
487442
("toml_assignment", "base_file_path", "packages"),
488443
[

0 commit comments

Comments
 (0)