Skip to content

Pyodide updates: pyemscripten platform tag (PEP 783), 314.0a1, pyodide-eol flag, and maintenance updates#2812

Open
agriyakhetarpal wants to merge 31 commits intopypa:mainfrom
agriyakhetarpal:pyodide-updates
Open

Pyodide updates: pyemscripten platform tag (PEP 783), 314.0a1, pyodide-eol flag, and maintenance updates#2812
agriyakhetarpal wants to merge 31 commits intopypa:mainfrom
agriyakhetarpal:pyodide-updates

Conversation

@agriyakhetarpal
Copy link
Copy Markdown
Member

@agriyakhetarpal agriyakhetarpal commented Apr 6, 2026

As stated in the PR title. Through this PR:

  • We now use pyodide config get emscripten_dir to get the Emscripten installation location (and always with --force to ensure a fresh, unmodified toolchain on every run)
  • Since PEP 783 has been accepted, I have updated the wheel platform tag to pyemscripten_year_number for all supported versions – Pyodide 0.29.4 (the first release on the 0.29.x patch line with pyemscripten wheel support) introduces this for the 2025 ABI, and our new 314.0.0a1 prerelease (enabled under pyodide-prerelease) does so for the 2026 ABI
  • We now have a pyodide-eol enable group (analogous to pypy-eol`) to keep cp312/Pyodide 0.27.7 available behind an opt-in flag
  • I've introduced a short Pyodide maintainer guide encompassing the recurring tasks around Pyodide releases in cibuildwheel
  • Lastly, new dependency updates via the constraints updater split out from [Bot] Update dependencies #2810 and other recent bot PRs

@agriyakhetarpal agriyakhetarpal changed the title WIP Pyodide updates Pyodide updates: remove hardcoded Emscripten location, pyemscripten platform tag (PEP 783), and update dependencies Apr 6, 2026
@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review April 6, 2026 15:39
@agriyakhetarpal agriyakhetarpal changed the title Pyodide updates: remove hardcoded Emscripten location, pyemscripten platform tag (PEP 783), and update dependencies Pyodide updates: remove hardcoded Emscripten location, switch to pyemscripten platform tag (PEP 783), and update dependencies Apr 6, 2026
@henryiii
Copy link
Copy Markdown
Contributor

henryiii commented Apr 7, 2026

It has been accepted. :D

@agriyakhetarpal
Copy link
Copy Markdown
Member Author

One question: should we rename Pyodide to Pyemscripten in most other places as well?

@hoodmane
Copy link
Copy Markdown
Contributor

hoodmane commented Apr 7, 2026

We should keep calling it Pyodide, nobody knows what pyemscripten is.

@henryiii
Copy link
Copy Markdown
Contributor

henryiii commented Apr 7, 2026

If we wanted to match everything else, then the platform would be emscripten (like linux), the identifier would be pyemscripten (like manylinux) or maybe even pyodide. I don't think it's important enough to change now, though now would be the time to do it when this is about to make a fairly big change to the wheel name.

Copy link
Copy Markdown
Member

@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.

One question: should we rename Pyodide to Pyemscripten in most other places as well?

+1 for keeping it as Pyodide.

Comment thread cibuildwheel/platforms/pyodide.py
Comment thread cibuildwheel/platforms/pyodide.py
@agriyakhetarpal
Copy link
Copy Markdown
Member Author

Alright, I think Pyodide stays as the name, then. We can always create an alias and add both Pyodide and pyemscripten at a time when the latter gains popularity.

Comment thread test/utils.py Outdated
platform_tags = {
"cp312-cp312": ["pyodide_2024_0_wasm32"],
"cp313-cp313": ["pyodide_2025_0_wasm32"],
"cp312-cp312": ["pyemscripten_2024_0_wasm32"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The existing tags should stay the same right? There is no version of Pyodide that accepts a wheel tagged pyemscripten_2024_0 so if we're going to make them we might as well just delete support for versions older than 314. But it'd be better not to change the existing behavior.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I believe this is a regression, then. @ryanking13, were we too early in changing to the pyemscripten platform tag in pyodide-build? Ideally the previous xbuildenvs (0.27.7, 0.29.3, etc.) should have set USE_LEGACY_PLATFORM, but then that's not possible to fix retroactively as we didn't know that at the time. So maybe we should yank pyodide-build==0.34.1, set USE_LEGACY_PLATFORM to 1 and create a new release with it (0.35.0 because semver), and then ensure that the upcoming 314.0 xbuildenv(s) will set USE_LEGACY_PLATFORM to 0 in Makefile.envs. I would like to support both 0.29.3 and 314.0 releases at the same time, to allow users extra time to switch ABIs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, I am not sure to be honest. If we keep the pyodide tag, then the package will not be uploadable to PyPI, if we change it to pyemscripten, old versions of micropip will deny the package. So both choices have downsides.

I am personally +1 for using the pyemscripten name for even older versions for consistency. Older Pyodide versions can still either 1) install newer micropip from PyPI, or 2) install it directly through pyodide.loadPackage. I think it is less confusing than outputting different platform names for differenet Python versions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, given that users do have an option to update micropip, and now that the first alpha of 314.0 is out (thanks to you!), I will add it in this PR and drop Pyodide 0.27.7.

Will that resolve your concerns, @hoodmane? Or, do you think that cibuildwheel should work around it now, and rename 2024_0 and 2025_0 ABI wheels that contain pyemscripten in the platform tag string back to pyodide for them?. We do have some time until this PR is merged and released, and it brings pyodide-build 0.34.1, so it's better that we do things right in the first go.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If a patch release of pyodide 3.13 with updated micropip was possible, then I'd go:

  • drop 3.12
  • switch 3.13 to pyemscripten_2025
  • keep 3.14 as "pre-release" until pyemscripten_2026 is declared stable.

If a patch release is hard to do... Well, that's uglier. Are these "normal" enough that wheel tag can re-tag?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There is now a v0.29.4 patch release: https://github.com/pyodide/pyodide/releases/tag/0.29.4. Updating to it!

@agriyakhetarpal agriyakhetarpal changed the title Pyodide updates: remove hardcoded Emscripten location, switch to pyemscripten platform tag (PEP 783), and update dependencies Pyodide updates: add 314.0 alpha, switch to pyemscripten platform tag (PEP 783), and remove hardcoded Emscripten location + update dependencies Apr 10, 2026
@agriyakhetarpal agriyakhetarpal changed the title Pyodide updates: add 314.0 alpha, switch to pyemscripten platform tag (PEP 783), and remove hardcoded Emscripten location + update dependencies Pyodide updates: pyemscripten platform tag (PEP 783), 314.0 alpha1, pyodide-eol flag, and maintenance updates May 7, 2026
@agriyakhetarpal agriyakhetarpal changed the title Pyodide updates: pyemscripten platform tag (PEP 783), 314.0 alpha1, pyodide-eol flag, and maintenance updates Pyodide updates: pyemscripten platform tag (PEP 783), 314.0a1, pyodide-eol flag, and maintenance updates May 7, 2026
@agriyakhetarpal
Copy link
Copy Markdown
Member Author

Ready for one more look!

Copy link
Copy Markdown
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.

I think we might be missing docs on the new enable option in docs/options.md.

also, I think it might be time for pyodide to lose its 'experimental' status in cibuildwheel? I noticed a note in docs/platforms.md.

The rest looked good to me, although I only skim-read it!

@joerick
Copy link
Copy Markdown
Contributor

joerick commented May 8, 2026

Oh, the other place to remove the experimental language would be the table at the top of the readme

@agriyakhetarpal
Copy link
Copy Markdown
Member Author

Good points @joerick, I've made those changes! Thank you!

@agriyakhetarpal
Copy link
Copy Markdown
Member Author

A bit of a note: since we do have pyodide-version/CIBW_PYODIDE_VERSION and it still works for any generalised Pyodide version case, people will be able to build for Pyodide beyond EOL if they would like to, so we'd consider pyodide-eol as more of a helper to do so.

Copy link
Copy Markdown
Member

@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.

Thanks for working on this @agriyakhetarpal! It looks good to me overall. As you mentioned, probably we need a new alpha, but I think this PR can land without it.

@@ -0,0 +1,113 @@
# Maintaining Pyodide support
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for writing this!

# compatible version here. delocate is macOS-only and not used on pyodide.
tool_versions = {
"pip": "23.1.2",
"build": "1.4.2",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what happens if we use build 1.4 or 1.5 for all cases?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It now supports 1.4 and 1.5, but it's highly constrained due to worries about it using build's internals. Those are generally okay, I think. I think the reason for 1.2.2 was likely older Python support, but we are dropping 3.9 so hopefully that's better now.

Copy link
Copy Markdown
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

Probably needs a followup removing pyodide 3.12.

@henryiii
Copy link
Copy Markdown
Contributor

henryiii commented May 9, 2026

@copilot resolve the merge conflicts in this pull request

(Edit: GitHub offered this as an option, but I don't think it works on cross-org pull requests)

EditEdit: Used Kimi-K2.6 locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants