Skip to content

Commit

Permalink
Miscellaneous updates for Pyodide 0.27: bump WASM CI and revise Arrow…
Browse files Browse the repository at this point in the history
… compatibility note (#60756)

* Update Pyodide versions for CI

* Git-ignore Pyodide xbuildenv folder

* Pin to Pyodide 0.27.1

* Drop "WASM (pyodide and pyscript)" from Arrow compatibility notes

* `TestCoercionFloat32.test_setitem` now xpasses
  • Loading branch information
agriyakhetarpal authored Jan 22, 2025
1 parent c168c06 commit b60e222
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,20 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python for Pyodide
- name: Set up Python for pyodide-build
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11.3'
python-version: '3.12'

- name: Set up Emscripten toolchain
uses: mymindstorm/setup-emsdk@v14
with:
version: '3.1.46'
version: '3.1.58'
actions-cache-folder: emsdk-cache

- name: Install pyodide-build
run: pip install "pyodide-build==0.25.1"
run: pip install "pyodide-build>=0.29.2"

- name: Build pandas for Pyodide
run: |
Expand All @@ -452,10 +452,13 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: Set up Pyodide virtual environment
env:
pyodide-version: '0.27.1'
run: |
pyodide xbuildenv install ${{ env.pyodide-version }}
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
pip install dist/*.whl
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,7 @@ doc/source/savefig/
# Interactive terminal generated files #
########################################
.jupyterlite.doit.db

# Pyodide/WASM related files #
##############################
/.pyodide-xbuildenv-*
2 changes: 0 additions & 2 deletions pandas/tests/series/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import numpy as np
import pytest

from pandas.compat import WASM
from pandas.compat.numpy import np_version_gte1p24
from pandas.errors import IndexingError

Expand Down Expand Up @@ -1449,7 +1448,6 @@ def obj(self):
np_version_gte1p24
and os.environ.get("NPY_PROMOTION_STATE", "weak") != "weak"
)
or WASM
),
reason="np.float32(1.1) ends up as 1.100000023841858, so "
"np_can_hold_element raises and we cast to float64",
Expand Down
1 change: 0 additions & 1 deletion web/pandas/pdeps/0010-required-pyarrow-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ Additionally, if a user is installing pandas in an environment where wheels are
the user will need to also build Arrow C++ and related dependencies when installing from source. These environments include

- Alpine linux (commonly used as a base for Docker containers)
- WASM (pyodide and pyscript)
- Python development versions

Lastly, pandas development and releases will need to be mindful of PyArrow's development and release cadance. For example when
Expand Down

0 comments on commit b60e222

Please sign in to comment.