feat: drop python3.13t (#2684)
* break: remove cp313t * break: drop unused cpython-freethreading enable option * update message
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user