Repository navigation
GH-55586: [Packaging][Python] Use pyodide venv for Emscripten/Pyodide testing infrastructure and unskip several tests - #55588
Conversation
pyodide venv for Emscripten/Pyodide testing infrastructure and unskip several testspyodide venv for Emscripten/Pyodide testing infrastructure and unskip several tests
|
|
|
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues require further changes.
No open issues 🎉
What changed in this PR
Replaces the custom Node.js test driver with pyodide venv, simplifying PyArrow’s Emscripten testing infrastructure and expanding test coverage.
Changes:
- Runs Node.js tests in a Pyodide virtual environment with additional testing dependencies.
- Expands browser test dependencies, restores Substrait test execution, and marks subprocess-dependent ORC tests.
- Documents the virtual-environment workflow and browser testing option.
| File | Description |
|---|---|
python/scripts/run_emscripten_tests.py |
Removes the Node driver, adds browser dependencies, and removes the Substrait exclusion. |
python/pyarrow/tests/test_orc.py |
Marks two timezone tests as requiring subprocess support. |
docs/source/developers/cpp/emscripten.rst |
Documents testing wheels with pyodide venv and browsers. |
ci/scripts/python_test_emscripten.sh |
Runs Node.js tests through pyodide venv while retaining Chrome testing. |
Review effort: Balanced
|
@github-actions crossbow submit emscripten |
|
Revision: 470540e Submitted crossbow builds: ursacomputing/crossbow @ actions-8bf8f13948
|
|
For two, yet another follow-up work/PRs after this:
Footnotes
|
Rationale for this change
Closes #55586.
This PR removes the
NodeDriverpart of the Emscripten/Pyodide testing infrastructure to replace it with a native replacement that we offer, calledpyodide venv. Here is our documentation: https://pyodide-build.readthedocs.io/en/stable/how-to/testing.htmlSince the Pyodide Python interpreter included in this virtual environment can access the file system, the timezone database directory can now be read, which enables the tests for the ORC reader.
What changes are included in this PR?
This PR includes the following changes:
NodeDrivertesting class andruntime=nodeoption fromscripts/run_emscripten_tests.py, and replaces them with apyodide venvinvocation, where testing dependencies (either pure Python or WASM wheels) can be pip-installed, akin to a conventional Python virtual environment. The documentation has been updated with a short section to reflect this.cffi,cloudpickle,fsspec, andscipy, which allow for 380 or so extra tests on Node, and 346 more in Chrome, to be run and pass. The remaining skips are due to features not built for the Emscripten platform, such as S3, Flight, and threading./usr/share/zoneinfocan now be accessed.test_timezone_database_absentandtest_timezone_absent, rely on subprocesses and are skipped accordingly.Are these changes tested?
Yes, I have built a WASM build for Arrow, and a pyemscripten wheel for PyArrow, and tested the changes locally in a Pyodide virtual environment and with Chrome installed on my macOS machine/
Are there any user-facing changes?
No, there are no user-facing changes as part of this PR.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by:
I have not used any AI tools for this PR.
pyodide venvfor testing PyArrow pyemscripten builds #55586