Skip to content

Updates for Pyodide 0.28 release #2487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jul 13, 2025

Conversation

agriyakhetarpal
Copy link
Member

@agriyakhetarpal agriyakhetarpal commented Jul 7, 2025

In account of the new Pyodide release, this PR adds a build identifier for Pyodide 0.28.0, updates the constraints, and updates the docs and tests.

Closes #2485

cc: @hoodmane @ryanking13

Comment on lines +102 to +112
# TODO: Re-enable this when we have Pyodide prereleases again (e.g., 0.29.0a1+)
# Python 3.13 support became stable in Pyodide 0.28.0, so it no longer needs a prerelease
# flag.
# Also update Pyodide tests in unit_test/build_selector_test.py accordingly.
# When re-enabling, update the pattern to match the experimental Python version in case
# it is bumped to Python 3.14 (likely cp314-pyodide_* but could remain as 3.13 as well).
# 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, "cp313-pyodide_*"
# ):
# return False
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the best way to handle this would be. We don't have a Pyodide 0.29.0 pre-release yet because it's too early to have one. We usually stay one year behind CPython version compatibility, allowing our packages to complete their upgrades. The cp313-pyodide_wasm32 identifier might stay for Pyodide 0.29, or it might not. The CPython version could even change between Pyodide 0.29 alphas (or 0.30 alphas, for that matter).

We currently say that "If there are pre-releases available for a newer Pyodide version, the pyodide-prerelease can be used to include pre-release versions." in the documentation.

We could document there that cibuildwheel can disable the pyodide-prerelease option when there are no pre-releases available?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally okay with the commenting approach above.

As for the other points, yeah, I can see that it might get a little awkward around alphas, but that's probably okay, that's what alphas are for :) @henryiii were discussing some ideas in #2448 about the possibility of being able to add new identifiers at runtime, which might help? Having said that, I think we're gonna continue to want the python version in the identifier to support the functionality of the requires-python feature.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for Pyodide 0.28.0 by bumping version pins, updating constraints and docs, and adjusting test logic.

  • Bumped default and test pyodide-version from 0.27.6 → 0.28.0 (and alpha a2 → a3)
  • Updated typing-extensions constraint to 4.14.1
  • Enabled CPython 3.13 in selector and updated related tests & CI

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
unit_test/options_test.py Updated expected Pyodide version to 0.28.0 in tests
unit_test/build_selector_test.py Adjusted test to include cp313-pyodide_wasm32
docs/platforms.md Clarified “Pyodide version” wording
docs/options.md Updated examples to use 0.28.0/a3
cibuildwheel/selector.py Commented out prerelease filter for cp313-pyodide
cibuildwheel/resources/constraints-*.txt Bumped typing-extensions to 4.14.1
cibuildwheel/resources/build-platforms.toml Set default_pyodide_version for cp313 to 0.28.0
.github/workflows/test.yml Switched CI build to cp313* and bumped to 0.28.0a3
Comments suppressed due to low confidence (1)

.github/workflows/test.yml:249

  • The CI is pinning an alpha (0.28.0a3) even though the default stable version is 0.28.0. Update this to the stable 0.28.0 or clarify why an alpha is needed to keep CI in sync with the default release.
        CIBW_PYODIDE_VERSION: "0.28.0a3"

@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review July 7, 2025 07:08
Copy link
Contributor

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Thanks @agriyakhetarpal!

Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

Comment on lines +102 to +112
# TODO: Re-enable this when we have Pyodide prereleases again (e.g., 0.29.0a1+)
# Python 3.13 support became stable in Pyodide 0.28.0, so it no longer needs a prerelease
# flag.
# Also update Pyodide tests in unit_test/build_selector_test.py accordingly.
# When re-enabling, update the pattern to match the experimental Python version in case
# it is bumped to Python 3.14 (likely cp314-pyodide_* but could remain as 3.13 as well).
# 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, "cp313-pyodide_*"
# ):
# return False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally okay with the commenting approach above.

As for the other points, yeah, I can see that it might get a little awkward around alphas, but that's probably okay, that's what alphas are for :) @henryiii were discussing some ideas in #2448 about the possibility of being able to add new identifiers at runtime, which might help? Having said that, I think we're gonna continue to want the python version in the identifier to support the functionality of the requires-python feature.

Copy link

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test is failing because of the version numbers. Otherwise looks good to me

@joerick
Copy link
Contributor

joerick commented Jul 11, 2025

This test failure has me stumped-

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
numpy>=1.26.0 from https://cdn.jsdelivr.net/pyodide/v0.28.0/full/numpy-2.2.5-cp313-cp313-pyodide_2025_0_wasm32.whl#sha256=ebf03d021b8b89cbb2e2a8a31655e8051ee2580e2bc0729f17484066ecdc4ec7 (from spam):
Expected sha256 ebf03d021b8b89cbb2e2a8a31655e8051ee2580e2bc0729f17484066ecdc4ec7
Got 467a88e8c79f9e10c8e7052bcc32dd12d44d51098beb3b8f970e1cfc965c6757

The confusing bit is that numpy isn't referenced by this test.

@agriyakhetarpal
Copy link
Member Author

I think the lockfile for 0.28.0 might be wrong... perhaps @hoodmane or @ryanking13 might know more? (Sorry, I'm crawling my way back to relevance after not having worked on Pyodide for a week).

@hoodmane
Copy link
Contributor

hoodmane commented Jul 11, 2025

Yes we're aware =)

@hoodmane
Copy link
Contributor

We'll have to make a 0.28.1 with the fix. It's fixed by pyodide/pyodide#5749

@ryanking13
Copy link

I patched the xbuildenv file in the GitHub releases manually. I think it will work now. Could you retrigger the CI? If the xbuilenv is cached, purging cache might be needed.

@agriyakhetarpal
Copy link
Member Author

Thanks, @ryanking13!

@henryiii henryiii merged commit cd9b48c into pypa:main Jul 13, 2025
44 of 45 checks passed
@agriyakhetarpal agriyakhetarpal deleted the bump/cibuildwheel-pyodide-0.28 branch July 13, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyodide 0.28.0 is now stable
5 participants