Skip to content

Commit cd9b48c

Browse files
feat: Pyodide 0.28 release (#2487)
* Bump testing version to 0.28.0 * Bump Pyodide constraints * Add Pyodide 0.28.0 identifier * Override to a different, alpha version for testing * Update docs for Pyodide versions everywhere * Add comment on using older Pyodide alpha version * Bump to `"cp313*"` for compatibility * Drop identifier for Pyodide 0.28.0a3 * Add back Pyodide 0.28.0a3 identifier * Add helpful comment about pyodide-prerelease option * Fix test and add a comment about it * Keep one Pyodide version per Python version * Fix docs for `pyodide-prerelease`; Python ➡️ Pyodide * Update utils.py * Drop CI test step for overridden Pyodide version Suggested-by: Joe Rickerby <[email protected]> --------- Co-authored-by: Henry Schreiner <[email protected]>
1 parent 5e24590 commit cd9b48c

File tree

7 files changed

+24
-32
lines changed

7 files changed

+24
-32
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,6 @@ jobs:
233233
env:
234234
CIBW_PLATFORM: pyodide
235235

236-
- name: Run a sample build (GitHub Action) for an overridden Pyodide version
237-
uses: ./
238-
with:
239-
package-dir: sample_proj
240-
output-dir: wheelhouse
241-
# In case this breaks at any point in time, switch to using the latest version
242-
# available or any other version that is not the same as the default one set
243-
# in cibuildwheel/resources/build-platforms.toml.
244-
env:
245-
CIBW_PLATFORM: pyodide
246-
CIBW_BUILD: "cp312*"
247-
CIBW_PYODIDE_VERSION: "0.27.6"
248-
249236
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
250237
run: |
251238
uv run --no-sync ./bin/run_tests.py

cibuildwheel/selector.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,17 @@ def __call__(self, build_id: str) -> bool:
9999
return False
100100
if EnableGroup.GraalPy not in self.enable and fnmatch(build_id, "gp*"):
101101
return False
102-
if EnableGroup.PyodidePrerelease not in self.enable and fnmatch(
103-
build_id, "cp313-pyodide_*"
104-
):
105-
return False
102+
# TODO: Re-enable this when we have Pyodide prereleases again (e.g., 0.29.0a1+)
103+
# Python 3.13 support became stable in Pyodide 0.28.0, so it no longer needs a prerelease
104+
# flag.
105+
# Also update Pyodide tests in unit_test/build_selector_test.py accordingly.
106+
# When re-enabling, update the pattern to match the experimental Python version in case
107+
# it is bumped to Python 3.14 (likely cp314-pyodide_* but could remain as 3.13 as well).
108+
# This depends on the CPython version being used in the Pyodide runtime at the time.
109+
# if EnableGroup.PyodidePrerelease not in self.enable and fnmatch(
110+
# build_id, "cp313-pyodide_*"
111+
# ):
112+
# return False
106113

107114
should_build = selector_matches(self.build_config, build_id)
108115
should_skip = selector_matches(self.skip_config, build_id)

docs/options.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,22 +1288,22 @@ The available Pyodide versions are determined by the version of `pyodide-build`
12881288

12891289
```toml
12901290
[tool.cibuildwheel.pyodide]
1291-
# Build Pyodide wheels using Pyodide version 0.27.6
1292-
pyodide-version = "0.27.6"
1291+
# Build Pyodide wheels using Pyodide version 0.28.0
1292+
pyodide-version = "0.28.0"
12931293

12941294
[tool.cibuildwheel.pyodide]
1295-
# Build Pyodide wheels using a specific alpha release
1296-
pyodide-version = "0.28.0a2"
1295+
# Build Pyodide wheels using a specific, previously released alpha release of 0.28.0
1296+
pyodide-version = "0.28.0a3"
12971297
```
12981298

12991299
!!! tab examples "Environment variables"
13001300

13011301
```yaml
1302-
# Build Pyodide wheels using Pyodide version 0.27.6
1303-
CIBW_PYODIDE_VERSION: 0.27.6
1302+
# Build Pyodide wheels using Pyodide version 0.28.0
1303+
CIBW_PYODIDE_VERSION: 0.28.0
13041304

1305-
# Build Pyodide wheels using a specific alpha release
1306-
CIBW_PYODIDE_VERSION: 0.28.0a2
1305+
# Build Pyodide wheels using a specific, previously released alpha release of 0.28.0
1306+
CIBW_PYODIDE_VERSION: 0.28.0a3
13071307
```
13081308

13091309

docs/platforms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ You must target pyodide with `--platform pyodide` (or use `--only` on the identi
172172

173173
It is also possible to target a specific Pyodide version by setting the [`pyodide-version`](options.md#pyodide-version) option to the desired version. Users are responsible for setting an appropriate Pyodide version according to the `pyodide-build` version. A list is available in Pyodide's [cross-build environments metadata file](https://github.com/pyodide/pyodide/blob/main/pyodide-cross-build-environments.json), which can be viewed more easily by installing `pyodide-build` from PyPI and using `pyodide xbuildenv search --all` to see a compatibility table.
174174

175-
If there are pre-releases available for a newer Python version, the `pyodide-prerelease` [`enable`](options.md#enable) can be used to include pre-release versions.
175+
If there are pre-releases available for a newer Pyodide version, the `pyodide-prerelease` [`enable`](options.md#enable) can be used to include pre-release versions.
176176

177177
### Running tests
178178

test/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,7 @@ def _expected_wheels(
261261
musllinux_versions = ["musllinux_1_2"]
262262

263263
if platform == "pyodide" and python_abi_tags is None:
264-
python_abi_tags = ["cp312-cp312"]
265-
if EnableGroup.PyodidePrerelease in enable_groups:
266-
python_abi_tags.append("cp313-cp313")
264+
python_abi_tags = ["cp312-cp312", "cp313-cp313"]
267265
elif platform == "ios" and python_abi_tags is None:
268266
python_abi_tags = ["cp313-cp313"]
269267
elif python_abi_tags is None:

unit_test/build_selector_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_build_filter_pyodide():
107107
enable=frozenset(),
108108
)
109109
assert build_selector("cp312-pyodide_wasm32")
110-
assert not build_selector("cp313-pyodide_wasm32")
110+
assert build_selector("cp313-pyodide_wasm32")
111111

112112

113113
def test_skip():

unit_test/options_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
3636
environment-pass = ["EXAMPLE_ENV"]
3737
38-
pyodide-version = "0.27.6"
38+
pyodide-version = "0.28.0"
3939
4040
[tool.cibuildwheel.macos]
4141
test-requires = "else"
@@ -92,7 +92,7 @@ def test_options_1(tmp_path, monkeypatch):
9292
assert local.manylinux_images["x86_64"] == pinned_x86_64_container_image["manylinux_2_34"]
9393

9494
local = options.build_options("cp312-pyodide_wasm32")
95-
assert local.pyodide_version == "0.27.6"
95+
assert local.pyodide_version == "0.28.0"
9696

9797

9898
def test_passthrough(tmp_path, monkeypatch):

0 commit comments

Comments
 (0)