diff --git a/cibuildwheel/extra.py b/cibuildwheel/extra.py index f0800606..30f280cb 100644 --- a/cibuildwheel/extra.py +++ b/cibuildwheel/extra.py @@ -103,7 +103,7 @@ class PyodideXBuildEnvInfo(typing.TypedDict): def get_pyodide_xbuildenv_info() -> PyodideXBuildEnvInfo: xbuildenv_info_url = ( - "https://pyodide.github.io/pyodide/api/pyodide-cross-build-environments.json" + "https://pyodide.github.io/pyodide/api/v2/pyodide-cross-build-environments.json" ) with urllib.request.urlopen(xbuildenv_info_url) as response: return typing.cast("PyodideXBuildEnvInfo", json.loads(response.read().decode("utf-8"))) diff --git a/cibuildwheel/resources/build-platforms.toml b/cibuildwheel/resources/build-platforms.toml index cd457f89..be8df333 100644 --- a/cibuildwheel/resources/build-platforms.toml +++ b/cibuildwheel/resources/build-platforms.toml @@ -217,7 +217,7 @@ python_configurations = [ python_configurations = [ { identifier = "cp312-pyodide_wasm32", version = "3.12", default_pyodide_version = "0.27.7", node_version = "v22", sha256 = "0c2e7db42efa5d1dac38b50f8b3d659a1e3885d0a233494831b8206281307d52" }, { identifier = "cp313-pyodide_wasm32", version = "3.13", default_pyodide_version = "0.29.4", node_version = "v22", sha256 = "a29fc4a076408a18fc29eb4b280f80c6dddc95c19514c874c29e590d0931c02a" }, - { identifier = "cp314-pyodide_wasm32", version = "3.14", default_pyodide_version = "314.0.0a2", node_version = "v24", sha256 = "ac7bbcdf289ab3ae25621c436b1d013099ef6bec644ad0538dae5d65552c5c95" }, + { identifier = "cp314-pyodide_wasm32", version = "3.14", default_pyodide_version = "314.0.0", node_version = "v24", sha256 = "6e76cf18251bd7d046bdb7ef35c9f938c8e995f10d88397497ca4b7020f27ba6" }, ] [android] diff --git a/cibuildwheel/resources/constraints-pyodide312.txt b/cibuildwheel/resources/constraints-pyodide312.txt index b9b0ad76..df35bf08 100644 --- a/cibuildwheel/resources/constraints-pyodide312.txt +++ b/cibuildwheel/resources/constraints-pyodide312.txt @@ -52,7 +52,7 @@ pydantic-core==2.46.4 # via pydantic pygments==2.20.0 # via rich -pyodide-build==0.34.4 +pyodide-build==0.35.0 # via -r .nox/update_constraints/tmp/constraints-pyodide.in pyodide-cli==0.5.0 # via diff --git a/cibuildwheel/resources/constraints-pyodide313.txt b/cibuildwheel/resources/constraints-pyodide313.txt index b9b0ad76..df35bf08 100644 --- a/cibuildwheel/resources/constraints-pyodide313.txt +++ b/cibuildwheel/resources/constraints-pyodide313.txt @@ -52,7 +52,7 @@ pydantic-core==2.46.4 # via pydantic pygments==2.20.0 # via rich -pyodide-build==0.34.4 +pyodide-build==0.35.0 # via -r .nox/update_constraints/tmp/constraints-pyodide.in pyodide-cli==0.5.0 # via diff --git a/cibuildwheel/resources/constraints-pyodide314.txt b/cibuildwheel/resources/constraints-pyodide314.txt index b9b0ad76..df35bf08 100644 --- a/cibuildwheel/resources/constraints-pyodide314.txt +++ b/cibuildwheel/resources/constraints-pyodide314.txt @@ -52,7 +52,7 @@ pydantic-core==2.46.4 # via pydantic pygments==2.20.0 # via rich -pyodide-build==0.34.4 +pyodide-build==0.35.0 # via -r .nox/update_constraints/tmp/constraints-pyodide.in pyodide-cli==0.5.0 # via diff --git a/cibuildwheel/selector.py b/cibuildwheel/selector.py index e9fa8c13..579a18f5 100644 --- a/cibuildwheel/selector.py +++ b/cibuildwheel/selector.py @@ -102,19 +102,19 @@ class BuildSelector: return False if EnableGroup.PyodideEoL not in self.enable and fnmatch(build_id, "cp312-pyodide_*"): return False - # NOTE: Disable this when we don't have any Pyodide prereleases (e.g., 314.0.0a1+) + # NOTE: Re-enable this when we have a new Pyodide prerelease (e.g., 315.0.0a1+) # When doing this, also: # 1. update Pyodide tests in unit_test/build_selector_test.py and unit_test/options_test.py accordingly. # 2. update Python versions for Pyodide identifiers in cibuildwheel/selector.py. # 3. update constraints as necessary via bin/generate_pyodide_constraints.py and add/delete # Pyodide constraints files in cibuildwheel/resources/constraints/ as necessary. - # When disabling, update the pattern to match the experimental Python version in case - # it is bumped to Python 3.15 (likely cp315-pyodide_* but could remain as 3.14 as well). + # When re-enabling, update the pattern to match the experimental Python version when + # it is bumped to Python 3.15 (likely cp315-pyodide_*). # This depends on the CPython version being used in the Pyodide runtime at the time. - if EnableGroup.PyodidePrerelease not in self.enable and fnmatch( - build_id, "cp314-pyodide_*" - ): - return False + # if EnableGroup.PyodidePrerelease not in self.enable and fnmatch( + # build_id, "cp315-pyodide_*" + # ): + # return False should_build = selector_matches(self.build_config, build_id) should_skip = selector_matches(self.skip_config, build_id) diff --git a/test/test_abi_variants.py b/test/test_abi_variants.py index b89f8c76..56fa08de 100644 --- a/test/test_abi_variants.py +++ b/test/test_abi_variants.py @@ -49,10 +49,10 @@ def test_abi3(tmp_path: Path) -> None: project_dir, add_env={ # free_threaded, GraalPy, and PyPy do not have a Py_LIMITED_API equivalent, just build one of those - # pyodide uses cp313 (the stable version) which supports limited API / abi3 + # pyodide uses cp314 (the latest stable version) which supports limited API / abi3 # also limit the number of builds for test performance reasons "CIBW_BUILD": ( - "cp313-*" + "cp314-*" if utils.get_platform() == "pyodide" else "cp39-* cp310-* pp310-* gp312_250-* cp312-* cp314t-*" ), diff --git a/test/test_dependency_versions.py b/test/test_dependency_versions.py index bf238c3c..3c1004d2 100644 --- a/test/test_dependency_versions.py +++ b/test/test_dependency_versions.py @@ -87,13 +87,13 @@ def get_versions_from_constraint_file(constraint_file: Path) -> dict[str, str]: return result -@pytest.mark.parametrize("python_version", ["3.9", "3.13"]) +@pytest.mark.parametrize("python_version", ["3.9", "3.14"]) def test_pinned_versions( tmp_path: Path, python_version: str, build_frontend_env_nouv: dict[str, str] ) -> None: if utils.get_platform() == "linux": pytest.skip("linux doesn't pin individual tool versions, it pins manylinux images instead") - if python_version != "3.13" and utils.get_platform() == "pyodide": + if python_version != "3.14" and utils.get_platform() == "pyodide": pytest.skip(f"pyodide does not support Python {python_version}") project_dir = tmp_path / "project" diff --git a/test/test_pyodide.py b/test/test_pyodide.py index 008adb1e..709dd21b 100644 --- a/test/test_pyodide.py +++ b/test/test_pyodide.py @@ -175,6 +175,6 @@ def test_pyodide_repair_wheel(tmp_path: Path) -> None: # check that the expected wheels are produced expected_wheels = [ - "spam-0.1.0-cp313-cp313-pyemscripten_2025_0_wasm32.whl", + "spam-0.1.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", ] assert set(actual_wheels) == set(expected_wheels) diff --git a/test/utils.py b/test/utils.py index 584d54d5..1553bb2c 100644 --- a/test/utils.py +++ b/test/utils.py @@ -31,7 +31,7 @@ EMULATED_ARCHS: Final[list[str]] = sorted( PYPY_ARCHS = ["x86_64", "i686", "AMD64", "aarch64", "arm64"] GRAALPY_ARCHS = ["x86_64", "AMD64", "aarch64", "arm64"] -SINGLE_PYTHON_VERSION: Final[tuple[int, int]] = (3, 13) +SINGLE_PYTHON_VERSION: Final[tuple[int, int]] = (3, 14) # temporary workaround: set by build_frontend_env fixture to skip graalpy # when uv is the build frontend (compatibility issue between graalpy and uv) @@ -278,9 +278,9 @@ def _expected_wheels( # To be kept in sync with Python versions for Pyodide identifiers in cibuildwheel/selector.py. if platform == "pyodide" and python_abi_tags is None: - python_abi_tags = ["cp313-cp313"] - if EnableGroup.PyodidePrerelease in enable_groups: - python_abi_tags.append("cp314-cp314") + python_abi_tags = ["cp313-cp313", "cp314-cp314"] + if EnableGroup.PyodideEoL in enable_groups: + python_abi_tags.insert(0, "cp312-cp312") elif (platform == "android" and python_abi_tags is None) or ( platform == "ios" and python_abi_tags is None ): @@ -414,8 +414,8 @@ def _expected_wheels( if not platform_tags: # for example if the python tag is `none` or `abi3`, the wheel - # is built by the stable cp313 Python version - platform_tags = ["pyemscripten_2025_0_wasm32"] + # is built by the latest stable cp314 Python version + platform_tags = ["pyemscripten_2026_0_wasm32"] else: msg = f"Unsupported platform {platform!r}" diff --git a/unit_test/build_selector_test.py b/unit_test/build_selector_test.py index e80ca97b..817cfce5 100644 --- a/unit_test/build_selector_test.py +++ b/unit_test/build_selector_test.py @@ -91,14 +91,15 @@ def test_build_filter_pypy_all() -> None: assert build_selector("pp39-manylinux_x86_64") -def test_build_filter_pyodide_prerelease() -> None: - build_selector = BuildSelector( - build_config="*", - skip_config="", - enable=frozenset([EnableGroup.PyodidePrerelease]), - ) - assert build_selector("cp313-pyodide_wasm32") - assert build_selector("cp314-pyodide_wasm32") +# Re-enable when we have Pyodide 3.15 prerelease builds to test against +# def test_build_filter_pyodide_prerelease() -> None: +# build_selector = BuildSelector( +# build_config="*", +# skip_config="", +# enable=frozenset([EnableGroup.PyodidePrerelease]), +# ) +# assert build_selector("cp314-pyodide_wasm32") +# assert build_selector("cp315-pyodide_wasm32") def test_build_filter_pyodide() -> None: @@ -108,8 +109,8 @@ def test_build_filter_pyodide() -> None: enable=frozenset(), ) assert build_selector("cp313-pyodide_wasm32") + assert build_selector("cp314-pyodide_wasm32") assert not build_selector("cp312-pyodide_wasm32") - assert not build_selector("cp314-pyodide_wasm32") def test_build_filter_pyodide_eol() -> None: @@ -120,7 +121,7 @@ def test_build_filter_pyodide_eol() -> None: ) assert build_selector("cp312-pyodide_wasm32") assert build_selector("cp313-pyodide_wasm32") - assert not build_selector("cp314-pyodide_wasm32") + assert build_selector("cp314-pyodide_wasm32") def test_skip() -> None: