Skip to content

[2026 ABI] Python 3.14#5995

Open
ryanking13 wants to merge 72 commits intopyodide:abi_2026_0from
ryanking13:2026-abi
Open

[2026 ABI] Python 3.14#5995
ryanking13 wants to merge 72 commits intopyodide:abi_2026_0from
ryanking13:2026-abi

Conversation

@ryanking13
Copy link
Member

@ryanking13 ryanking13 commented Nov 12, 2025

Preparing for Python update. Merging this PR doesn't mean that we are freezing ABI. We should decide when we freeze the ABI separately.

Checklist

  • Change target branch to 2026_0 or somthing
  • Fix patches
  • Fix rust sysroot
  • Update Emscripten version

@ryanking13 ryanking13 changed the base branch from main to abi_2026_0 January 29, 2026 08:29
- Bump Python version from 3.13.2 to 3.14.0
- Update PYODIDE_ABI_VERSION to 2026_0
- Update pyo3 version from 0.24.0 to 0.27.0
- Remove upstreamed CPython patches (wasm-gc trampoline, iPad detection, ZoneInfo)
- Update various version references and config files for Python 3.14
- Sync package-lock.json and other dependencies
@ryanking13 ryanking13 marked this pull request as ready for review February 11, 2026 07:20
del exc_info
assert v == ["{1}", "{2}", "{3}", "{4}"]
assert sys.getrefcount(v) == 2
assert sys.getrefcount(v) == 1
Copy link
Member Author

Choose a reason for hiding this comment

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

My guess is that this is related to refcount optimization in CPython 3.14

https://docs.python.org/3/whatsnew/3.14.html#optimizations



@requires_jspi
@pytest.mark.requires_dynamic_linking
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 had issues making JSPI work in no-dylink build. Disabling for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines -2070 to +2075
msg = "hiwire_{} on invalid reference 77. This is most likely due to use after free. It may also be due to memory corruption."
msg = "hiwire_{} on invalid reference 12345. This is most likely due to use after free. It may also be due to memory corruption."
Copy link
Member Author

Choose a reason for hiding this comment

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

The hiwire value for this index seems unstable, and I wonder if there is a better way to test this.

Copy link
Member

Choose a reason for hiding this comment

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

If we're going to delete this, let's do it in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I didn't realize that I removed this patch.

Comment on lines +19 to +24
//
// Changelog:
// - Python 3.14:
// asyncio state (running loop and task) is now stored directly
// in _PyThreadStateImpl fields (asyncio_running_loop, asyncio_running_task)
// instead of in a global dictionary.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need this, people can look at git history if they care.

void
restoreAsyncioState(AsyncioState as)
{
if (as.task == NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

We should remove saveAsyncioState and restoreAsyncioState entirely since this function doesn't do anything anymore.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants