Skip to content

Commit

Permalink
Update pyodide to 0.23.0 (pydantic#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 4, 2023
1 parent 1276e37 commit 49ee9ea
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: install rust nightly
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -230,7 +230,7 @@ jobs:
# NOTE!: as per https://github.com/pydantic/pydantic-core/pull/149 this version needs to match the version
# in node_modules/pyodide/repodata.json, to get the version, run:
# `cat node_modules/pyodide/repodata.json | python -m json.tool | rg platform`
version: '3.1.27'
version: '3.1.32'
actions-cache-folder: emsdk-cache

- run: pip install 'maturin>=0.13,<0.15' 'black>=22.3.0,<23' typing_extensions
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ build-coverage:

.PHONY: build-wasm
build-wasm:
@echo 'This requires python 3.10, maturin and emsdk to be installed'
maturin build --release --target wasm32-unknown-emscripten --out dist -i 3.10
@echo 'This requires python 3.11, maturin and emsdk to be installed'
maturin build --release --target wasm32-unknown-emscripten --out dist -i 3.11
ls -lh dist

.PHONY: format
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"main": "tests/emscripten_runner.js",
"dependencies": {
"prettier": "^2.7.1",
"pyodide": "^0.22.0"
"pyodide": "^0.23.0"
},
"scripts": {
"test": "node tests/emscripten_runner.js",
Expand Down
2 changes: 1 addition & 1 deletion wasm-preview/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def main(tests_zip: str, tag_name: str):
# File saved on the GH release
pydantic_core_wheel = (
'https://githubproxy.samuelcolvin.workers.dev/pydantic/pydantic-core/releases/'
f'download/{tag_name}/pydantic_core-{tag_name.lstrip("v")}-cp310-cp310-emscripten_3_1_27_wasm32.whl'
f'download/{tag_name}/pydantic_core-{tag_name.lstrip("v")}-cp311-cp311-emscripten_3_1_32_wasm32.whl'
)
zip_file = ZipFile(BytesIO(base64.b64decode(tests_zip)))
count = 0
Expand Down
2 changes: 1 addition & 1 deletion wasm-preview/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function main() {
get(`./run_tests.py?v=${Date.now()}`, 'text'),
// e4cf2e2 commit matches the pydantic-core wheel being used, so tests should pass
get(zip_url, 'blob'),
importScripts('https://cdn.jsdelivr.net/pyodide/v0.22.0/full/pyodide.js'),
importScripts('https://cdn.jsdelivr.net/pyodide/v0.23.0/full/pyodide.js'),
]);

const pyodide = await loadPyodide();
Expand Down

0 comments on commit 49ee9ea

Please sign in to comment.