Skip to content

Commit 2d155c0

Browse files
committed
Build cp311 without setting prerelease_pythons
1 parent 6549a90 commit 2d155c0

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ What does it do?
3737
<sup>¹ PyPy is only supported for manylinux wheels.</sup><br>
3838
<sup>² Windows arm64 support is experimental.</sup><br>
3939
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
40-
<sup>⁴ CPython 3.11 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.</sup><br>
40+
<sup>⁴ CPython 3.11 is built by default using Python 3.11.0rc1, starting with cibuildwheel 2.9.</sup><br>
4141

4242
- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
4343
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI

cibuildwheel/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class BuildSelector:
242242
requires_python: SpecifierSet | None = None
243243

244244
# a pattern that skips prerelease versions, when include_prereleases is False.
245-
PRERELEASE_SKIP: ClassVar[str] = "cp311-*"
245+
PRERELEASE_SKIP: ClassVar[str] = ""
246246
prerelease_pythons: bool = False
247247

248248
def __call__(self, build_id: str) -> bool:

unit_test/build_selector_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_build():
1111
assert build_selector("cp36-manylinux_x86_64")
1212
assert build_selector("cp37-manylinux_x86_64")
1313
assert build_selector("cp310-manylinux_x86_64")
14-
assert not build_selector("cp311-manylinux_x86_64")
14+
assert build_selector("cp311-manylinux_x86_64")
1515
assert build_selector("pp36-manylinux_x86_64")
1616
assert build_selector("pp37-manylinux_x86_64")
1717
assert build_selector("cp36-manylinux_i686")
@@ -30,7 +30,7 @@ def test_build():
3030
assert build_selector("cp36-win_amd64")
3131
assert build_selector("cp37-win_amd64")
3232
assert build_selector("cp310-win_amd64")
33-
assert not build_selector("cp311-win_amd64")
33+
assert build_selector("cp311-win_amd64")
3434
assert not build_selector("pp36-win_amd64")
3535
assert not build_selector("pp37-win_amd64")
3636

unit_test/linux_build_steps_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ def before_alls(step):
6060
pprint(build_steps)
6161

6262
assert build_steps[0].container_image == "normal_container_image"
63-
assert identifiers(build_steps[0]) == ["cp36-manylinux_x86_64", "cp37-manylinux_x86_64"]
64-
assert before_alls(build_steps[0]) == ["", ""]
63+
assert identifiers(build_steps[0]) == [
64+
"cp36-manylinux_x86_64",
65+
"cp37-manylinux_x86_64",
66+
"cp311-manylinux_x86_64",
67+
]
68+
assert before_alls(build_steps[0]) == ["", "", ""]
6569

6670
assert build_steps[1].container_image == "other_container_image"
6771
assert identifiers(build_steps[1]) == ["cp38-manylinux_x86_64", "cp310-manylinux_x86_64"]

unit_test/option_prepare_test.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from cibuildwheel import linux, util
1414
from cibuildwheel.__main__ import main
1515

16-
ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "pp37", "pp38", "pp39"}
16+
ALL_IDS = {"cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "pp37", "pp38", "pp39"}
1717

1818

1919
@pytest.fixture
@@ -137,7 +137,8 @@ def test_build_with_override_launches(mock_build_container, monkeypatch, tmp_pat
137137

138138
identifiers = {x.identifier for x in kwargs["platform_configs"]}
139139
assert identifiers == {
140-
f"{x}-manylinux_x86_64" for x in ALL_IDS - {"cp36", "cp310", "pp37", "pp38", "pp39"}
140+
f"{x}-manylinux_x86_64"
141+
for x in ALL_IDS - {"cp36", "cp310", "cp311", "pp37", "pp38", "pp39"}
141142
}
142143
assert kwargs["options"].build_options("cp37-manylinux_x86_64").before_all == ""
143144

@@ -147,10 +148,7 @@ def test_build_with_override_launches(mock_build_container, monkeypatch, tmp_pat
147148
assert not kwargs["container"]["simulate_32_bit"]
148149
identifiers = {x.identifier for x in kwargs["platform_configs"]}
149150
assert identifiers == {
150-
"cp310-manylinux_x86_64",
151-
"pp37-manylinux_x86_64",
152-
"pp38-manylinux_x86_64",
153-
"pp39-manylinux_x86_64",
151+
f"{x}-manylinux_x86_64" for x in {"cp310", "cp311", "pp37", "pp38", "pp39"}
154152
}
155153

156154
kwargs = build_in_container.call_args_list[3][1]

0 commit comments

Comments
 (0)