Skip to content

Commit 751d80f

Browse files
committed
gh-145177: Bump emscripten to 5.0.4
Before Emscripten 4.0.19, there was a bug in the dynamic loader that caused any dynamic library that links libffi to fail to load. _ctypes_test.so unnecessarily links libffi so it would fail to load and tests that needed it were skipped. There are two test failures behind that: one involving stack overflows which we have to skip as usual, and one that assumes that the abi for a function that takes a single struct with two doubles is the same as the abi for a function that takes two double arguments. This is not true in webassembly so we skip the test. There is another regression in Emscripten 5.0.5 which breaks a couple tests in test_secrets and test_random, so leave updating past that to a followup.
1 parent 8646385 commit 751d80f

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

Lib/test/test_platform.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,20 @@ def test_ios_ver(self):
534534

535535
def test_libc_ver(self):
536536
if support.is_emscripten:
537-
assert platform.libc_ver() == ("emscripten", "4.0.19")
537+
import tomllib
538+
from pathlib import Path
539+
540+
# Get expected emscripten version from emscripten config
541+
config_path = (
542+
Path(__file__).parents[2] / "Platforms/emscripten/config.toml"
543+
)
544+
with open(config_path, "rb") as fp:
545+
emscripten_version = tomllib.load(fp)["emscripten-version"]
546+
547+
self.assertEqual(
548+
platform.libc_ver(), ("emscripten", emscripten_version)
549+
)
550+
538551
return
539552
# check that libc_ver(executable) doesn't raise an exception
540553
if os.path.isdir(sys.executable) and \

Platforms/emscripten/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Any data that can vary between Python versions is to be kept in this file.
22
# This allows for blanket copying of the Emscripten build code between supported
33
# Python versions.
4-
emscripten-version = "4.0.19"
4+
emscripten-version = "5.0.4"
55
node-version = "24"
66
test-args = [
77
"-m", "test",

0 commit comments

Comments
 (0)