https://github.com/python/cpython/commit/c83d3d789eec9db1fc5ce00d1a320afe20d725fa
commit: c83d3d789eec9db1fc5ce00d1a320afe20d725fa
branch: main
author: Hood Chatham <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-06-05T13:59:43+08:00
summary:

gh-145177: Bump emscripten version to 4.0.19 (#150926)

Bumpts the emscripten version to 4.0.19.

files:
M Lib/test/test_platform.py
M Platforms/emscripten/config.toml
M Platforms/emscripten/streams.mjs

diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 9ee97b922ad48e..63c130813ec497 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -534,7 +534,7 @@ def test_ios_ver(self):
 
     def test_libc_ver(self):
         if support.is_emscripten:
-            assert platform.libc_ver() == ("emscripten", "4.0.12")
+            assert platform.libc_ver() == ("emscripten", "4.0.19")
             return
         # check that libc_ver(executable) doesn't raise an exception
         if os.path.isdir(sys.executable) and \
diff --git a/Platforms/emscripten/config.toml b/Platforms/emscripten/config.toml
index ba2dc8f4a482bf..401e9396ddbb00 100644
--- a/Platforms/emscripten/config.toml
+++ b/Platforms/emscripten/config.toml
@@ -1,7 +1,7 @@
 # Any data that can vary between Python versions is to be kept in this file.
 # This allows for blanket copying of the Emscripten build code between 
supported
 # Python versions.
-emscripten-version = "4.0.12"
+emscripten-version = "4.0.19"
 node-version = "24"
 test-args = [
     "-m", "test",
diff --git a/Platforms/emscripten/streams.mjs b/Platforms/emscripten/streams.mjs
index 76ad79f9247f4c..1b121d48d4e76c 100644
--- a/Platforms/emscripten/streams.mjs
+++ b/Platforms/emscripten/streams.mjs
@@ -112,7 +112,7 @@ const prepareBuffer = (buffer, offset, length) =>
 
 const TTY_OPS = {
   ioctl_tiocgwinsz(tty) {
-    return tty.devops.ioctl_tiocgwinsz?.();
+    return tty.devops.ioctl_tiocgwinsz?.() ?? [24, 80];
   },
 };
 
@@ -188,6 +188,10 @@ class NodeReader {
   fsync() {
     nodeFsync(this.nodeStream.fd);
   }
+
+  ioctl_tiocgwinsz() {
+    return [this.nodeStream.rows ?? 24, this.nodeStream.columns ?? 80];
+  }
 }
 
 class NodeWriter {

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to