feat: drop python3.13t (#2684)
* break: remove cp313t * break: drop unused cpython-freethreading enable option * update message
This commit is contained in:
@@ -52,7 +52,7 @@ def test_build_filter_pre() -> None:
|
||||
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() -> None:
|
||||
@@ -210,12 +210,6 @@ def test_build_limited_python_patch() -> None:
|
||||
assert build_selector("cp37-manylinux_x86_64")
|
||||
|
||||
|
||||
def test_build_free_threaded_python() -> None:
|
||||
build_selector = BuildSelector(build_config="*", skip_config="", enable=frozenset(EnableGroup))
|
||||
|
||||
assert build_selector("cp313t-manylinux_x86_64")
|
||||
|
||||
|
||||
def test_testing_selector() -> None:
|
||||
# This is not a global import to keep pytest from collecting it as a test
|
||||
test_selector = cibuildwheel.selector.TestSelector(skip_config="cp36-*")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import sys
|
||||
import tomllib
|
||||
from collections.abc import Mapping
|
||||
@@ -168,78 +167,6 @@ def test_empty_selector(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
assert e.value.code == 3
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("platform", "intercepted_build_args")
|
||||
def test_cp313t_warning1(
|
||||
monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
|
||||
) -> None:
|
||||
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: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
|
||||
) -> None:
|
||||
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: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
|
||||
) -> None:
|
||||
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: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
|
||||
) -> None:
|
||||
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"),
|
||||
[
|
||||
@@ -514,6 +441,7 @@ def test_config_settings(
|
||||
"?p27*",
|
||||
"?p2*",
|
||||
"?p35*",
|
||||
"cp313t*",
|
||||
],
|
||||
)
|
||||
@pytest.mark.usefixtures("platform", "intercepted_build_args", "allow_empty")
|
||||
@@ -532,8 +460,11 @@ def test_build_selector_deprecated_error(
|
||||
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 4.x no longer supports Python 3.13 free-threading. Please use the 3.x series 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
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ from cibuildwheel.oci_container import OCIPlatform
|
||||
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: pytest.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 @@ before-all = "true"
|
||||
"cp311",
|
||||
"cp312",
|
||||
"cp313",
|
||||
"cp313t",
|
||||
"cp314",
|
||||
"cp314t",
|
||||
"pp38",
|
||||
@@ -179,7 +178,6 @@ before-all = "true"
|
||||
"cp311",
|
||||
"cp312",
|
||||
"cp313",
|
||||
"cp313t",
|
||||
"cp314",
|
||||
"cp314t",
|
||||
"pp38",
|
||||
|
||||
@@ -18,7 +18,6 @@ from cibuildwheel.options import (
|
||||
_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
|
||||
|
||||
@@ -446,50 +445,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"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user