feat: drop python 3.6 & 3.7 support (#2282)
This commit is contained in:
@@ -18,6 +18,6 @@ def test_defaults():
|
||||
assert dependency_constraints.get_for_python_version("3.9").samefile(
|
||||
resources_dir / "constraints-python39.txt"
|
||||
)
|
||||
assert dependency_constraints.get_for_python_version("3.6").samefile(
|
||||
resources_dir / "constraints-python36.txt"
|
||||
assert dependency_constraints.get_for_python_version("3.13").samefile(
|
||||
resources_dir / "constraints-python313.txt"
|
||||
)
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_linux_container_split(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
|
||||
archs = "x86_64 i686"
|
||||
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "cp{37,38,39,310}-*"
|
||||
select = "cp{38,39,310}-*"
|
||||
manylinux-x86_64-image = "other_container_image"
|
||||
manylinux-i686-image = "other_container_image"
|
||||
|
||||
@@ -68,29 +68,28 @@ def test_linux_container_split(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
|
||||
|
||||
default_container_engine = OCIContainerEngineConfig(name="docker")
|
||||
|
||||
assert build_steps[0].container_image == "normal_container_image"
|
||||
assert identifiers(build_steps[0]) == [
|
||||
"cp36-manylinux_x86_64",
|
||||
assert build_steps[0].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[0]) == ["cp38-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[0]) == [""]
|
||||
assert container_engines(build_steps[0]) == [default_container_engine]
|
||||
|
||||
assert build_steps[1].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[1]) == ["cp39-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[1]) == ["echo 'a cp39-only command'"]
|
||||
assert container_engines(build_steps[1]) == [default_container_engine]
|
||||
|
||||
assert build_steps[2].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[2]) == ["cp310-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[2]) == [""]
|
||||
assert container_engines(build_steps[2]) == [
|
||||
OCIContainerEngineConfig(name="docker", create_args=("--privileged",))
|
||||
]
|
||||
|
||||
assert build_steps[3].container_image == "normal_container_image"
|
||||
assert identifiers(build_steps[3]) == [
|
||||
"cp311-manylinux_x86_64",
|
||||
"cp312-manylinux_x86_64",
|
||||
"cp313-manylinux_x86_64",
|
||||
]
|
||||
assert before_alls(build_steps[0]) == [""] * 4
|
||||
assert container_engines(build_steps[0]) == [default_container_engine] * 4
|
||||
|
||||
assert build_steps[1].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[1]) == ["cp37-manylinux_x86_64", "cp38-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[1]) == [""] * 2
|
||||
assert container_engines(build_steps[1]) == [default_container_engine] * 2
|
||||
|
||||
assert build_steps[2].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[2]) == ["cp39-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[2]) == ["echo 'a cp39-only command'"]
|
||||
assert container_engines(build_steps[2]) == [default_container_engine]
|
||||
|
||||
assert build_steps[3].container_image == "other_container_image"
|
||||
assert identifiers(build_steps[3]) == ["cp310-manylinux_x86_64"]
|
||||
assert before_alls(build_steps[3]) == [""]
|
||||
assert container_engines(build_steps[3]) == [
|
||||
OCIContainerEngineConfig(name="docker", create_args=("--privileged",))
|
||||
]
|
||||
assert before_alls(build_steps[3]) == [""] * 3
|
||||
assert container_engines(build_steps[3]) == [default_container_engine] * 3
|
||||
|
||||
@@ -309,6 +309,7 @@ def test_config_settings(platform_specific, platform, intercepted_build_args, mo
|
||||
[
|
||||
"cp27-*",
|
||||
"cp35-*",
|
||||
"?p36-*",
|
||||
"?p27*",
|
||||
"?p2*",
|
||||
"?p35*",
|
||||
@@ -327,7 +328,8 @@ def test_build_selector_deprecated_error(monkeypatch, selector, pattern, capsys)
|
||||
main()
|
||||
|
||||
stderr = capsys.readouterr().err
|
||||
msg = f"cibuildwheel 2.x no longer supports Python < 3.6. Please use the 1.x series or update {selector}"
|
||||
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 {selector}"
|
||||
assert msg in stderr
|
||||
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ from cibuildwheel.__main__ import main
|
||||
from cibuildwheel.oci_container import OCIPlatform
|
||||
from cibuildwheel.util import file
|
||||
|
||||
DEFAULT_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "cp312", "cp313"}
|
||||
ALL_IDS = DEFAULT_IDS | {"cp313t", "pp37", "pp38", "pp39", "pp310", "pp311"}
|
||||
DEFAULT_IDS = {"cp38", "cp39", "cp310", "cp311", "cp312", "cp313"}
|
||||
ALL_IDS = DEFAULT_IDS | {"cp313t", "pp38", "pp39", "pp310", "pp311"}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -114,7 +114,7 @@ manylinux-i686-image = "manylinux2014"
|
||||
musllinux-x86_64-image = "musllinux_1_1"
|
||||
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "cp36-manylinux_x86_64"
|
||||
select = "cp38-manylinux_x86_64"
|
||||
before-all = "true"
|
||||
"""
|
||||
)
|
||||
@@ -134,8 +134,8 @@ before-all = "true"
|
||||
assert kwargs["container"]["oci_platform"] == OCIPlatform.AMD64
|
||||
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {"cp36-manylinux_x86_64"}
|
||||
assert kwargs["options"].build_options("cp36-manylinux_x86_64").before_all == "true"
|
||||
assert identifiers == {"cp38-manylinux_x86_64"}
|
||||
assert kwargs["options"].build_options("cp38-manylinux_x86_64").before_all == "true"
|
||||
|
||||
kwargs = build_in_container.call_args_list[1][1]
|
||||
assert "quay.io/pypa/manylinux2014_x86_64" in kwargs["container"]["image"]
|
||||
@@ -147,20 +147,19 @@ before-all = "true"
|
||||
f"{x}-manylinux_x86_64"
|
||||
for x in ALL_IDS
|
||||
- {
|
||||
"cp36",
|
||||
"cp38",
|
||||
"cp310",
|
||||
"cp311",
|
||||
"cp312",
|
||||
"cp313",
|
||||
"cp313t",
|
||||
"pp37",
|
||||
"pp38",
|
||||
"pp39",
|
||||
"pp310",
|
||||
"pp311",
|
||||
}
|
||||
}
|
||||
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
|
||||
assert kwargs["options"].build_options("cp39-manylinux_x86_64").before_all == ""
|
||||
|
||||
kwargs = build_in_container.call_args_list[2][1]
|
||||
assert "quay.io/pypa/manylinux_2_28_x86_64" in kwargs["container"]["image"]
|
||||
@@ -175,7 +174,6 @@ before-all = "true"
|
||||
"cp312",
|
||||
"cp313",
|
||||
"cp313t",
|
||||
"pp37",
|
||||
"pp38",
|
||||
"pp39",
|
||||
"pp310",
|
||||
@@ -198,7 +196,7 @@ before-all = "true"
|
||||
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {
|
||||
f"{x}-musllinux_x86_64" for x in ALL_IDS & {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x
|
||||
f"{x}-musllinux_x86_64" for x in ALL_IDS & {"cp38", "cp39"} if "pp" not in x
|
||||
}
|
||||
|
||||
kwargs = build_in_container.call_args_list[5][1]
|
||||
@@ -207,7 +205,7 @@ before-all = "true"
|
||||
assert kwargs["container"]["oci_platform"] == OCIPlatform.AMD64
|
||||
identifiers = {x.identifier for x in kwargs["platform_configs"]}
|
||||
assert identifiers == {
|
||||
f"{x}-musllinux_x86_64" for x in ALL_IDS - {"cp36", "cp37", "cp38", "cp39"} if "pp" not in x
|
||||
f"{x}-musllinux_x86_64" for x in ALL_IDS - {"cp38", "cp39"} if "pp" not in x
|
||||
}
|
||||
|
||||
kwargs = build_in_container.call_args_list[6][1]
|
||||
|
||||
@@ -19,7 +19,7 @@ from cibuildwheel.selector import EnableGroup
|
||||
|
||||
PYPROJECT_1 = """
|
||||
[tool.cibuildwheel]
|
||||
build = ["cp38*", "cp37*"]
|
||||
build = ["cp38-*", "cp313-*"]
|
||||
skip = ["*musllinux*"]
|
||||
environment = {FOO="BAR"}
|
||||
|
||||
@@ -34,7 +34,7 @@ environment-pass = ["EXAMPLE_ENV"]
|
||||
test-requires = "else"
|
||||
|
||||
[[tool.cibuildwheel.overrides]]
|
||||
select = "cp37*"
|
||||
select = "cp313-*"
|
||||
test-command = "pyproject-override"
|
||||
manylinux-x86_64-image = "manylinux2014"
|
||||
"""
|
||||
@@ -60,7 +60,7 @@ def test_options_1(tmp_path, monkeypatch):
|
||||
|
||||
override_display = """\
|
||||
*: pyproject
|
||||
cp37-manylinux_x86_64, cp37-manylinux_i686: pyproject-override"""
|
||||
cp313-manylinux_x86_64, cp313-manylinux_i686: pyproject-override"""
|
||||
print(options.summary(identifiers))
|
||||
|
||||
assert override_display in options.summary(identifiers)
|
||||
@@ -78,7 +78,7 @@ def test_options_1(tmp_path, monkeypatch):
|
||||
assert local.test_sources == ["test", "other dir"]
|
||||
assert local.manylinux_images["x86_64"] == pinned_x86_64_container_image["manylinux1"]
|
||||
|
||||
local = options.build_options("cp37-manylinux_x86_64")
|
||||
local = options.build_options("cp313-manylinux_x86_64")
|
||||
assert local.manylinux_images is not None
|
||||
assert local.test_command == "pyproject-override"
|
||||
assert local.test_sources == ["test", "other dir"]
|
||||
|
||||
Reference in New Issue
Block a user