From 6b666d1f066dc24802c5cd821496dae49eea97bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 2 Mar 2026 12:33:51 +0100 Subject: [PATCH 1/3] GH-49426: [Python] Do not build pyarrow-stubs on emscripten builds --- python/setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/setup.py b/python/setup.py index 4f2bf7585e13..02e7cb4614de 100755 --- a/python/setup.py +++ b/python/setup.py @@ -126,6 +126,9 @@ def run(self): def _update_stubs(self): """Copy stubs to build directory, then inject docstrings into the copies.""" + if is_emscripten: + # stubs are not supported in Emscripten build + return stubs_dir = pjoin(setup_dir, 'pyarrow-stubs') if not os.path.exists(stubs_dir): return From 3bd04d88a884a3e9f0dd94dcb505cb5c621b6b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 3 Mar 2026 11:27:50 +0100 Subject: [PATCH 2/3] Use 127.0.0.1 for the server instead of 0.0.0.0 as chrome might silently fail blocking it --- python/scripts/run_emscripten_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/scripts/run_emscripten_tests.py b/python/scripts/run_emscripten_tests.py index 406dfc54e4fc..493efa1d9471 100644 --- a/python/scripts/run_emscripten_tests.py +++ b/python/scripts/run_emscripten_tests.py @@ -116,7 +116,7 @@ def end_headers(self): def run_server_thread(dist_dir, q): global _SERVER_ADDRESS os.chdir(dist_dir) - server = http.server.HTTPServer(("", 0), TemplateOverrider) + server = http.server.HTTPServer(("127.0.0.1", 0), TemplateOverrider) q.put(server.server_address) print(f"Starting server for {dist_dir} at: {server.server_address}") server.serve_forever() From d5b20278e198dade2f917ac670081f80fe961348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Tue, 3 Mar 2026 12:03:06 +0100 Subject: [PATCH 3/3] Attempt to fix tzdata related tests on emscripten --- python/scripts/run_emscripten_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/scripts/run_emscripten_tests.py b/python/scripts/run_emscripten_tests.py index 493efa1d9471..a4f9ce9d9a28 100644 --- a/python/scripts/run_emscripten_tests.py +++ b/python/scripts/run_emscripten_tests.py @@ -280,6 +280,7 @@ def _load_pyarrow_in_runner(driver, wheel_name): if "pyarrow" not in sys.modules: await micropip.install("hypothesis") import pyodide_js as pjs + await pjs.loadPackage("tzdata") await pjs.loadPackage("numpy") await pjs.loadPackage("pandas") import pytest