deprecation: cp313t (#2787)
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.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import sys
|
||||
import tomllib
|
||||
from collections.abc import Mapping
|
||||
@@ -167,6 +168,78 @@ 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"),
|
||||
[
|
||||
@@ -579,6 +652,7 @@ def test_enable_all(
|
||||
intercepted_build_args: "ArgsInterceptor", monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
monkeypatch.setattr(sys, "argv", [*sys.argv, "--enable", "all"])
|
||||
monkeypatch.delenv("CIBW_ENABLE", raising=False)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user