mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-26 08:03:59 -05:00
Upgrade to Pyodide 0.23 (#1347)
* Upgrade to Pyodide 0.23.2 * Update changelog * Use @param decorator to fix kmeans examlpe * Separate zz_example tests to run sequentially * Remove pytest.raises from pyscript_src_not_found test, use check_js_errors instead * Add 'check_js_errors' to wait_for_pyscript
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
Features
|
||||
--------
|
||||
|
||||
- The default version of Pyodide is now `0.23.2`. See the [Pyodide Changelog](https://pyodide.org/en/stable/project/changelog.html#version-0-23-2) for a detailed list of changes.
|
||||
- Added the `@when` decorator for attaching Python functions as event handlers
|
||||
- The `py-mount` attribute on HTML elements has been deprecated, and will be removed in a future release.
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@ $ pytest test_01_basic.py -k test_pyscript_hello -s
|
||||
[ 0.00 page.goto ] pyscript_hello.html
|
||||
[ 0.01 request ] 200 - fake_server - http://fake_server/pyscript_hello.html
|
||||
...
|
||||
[ 0.17 console.info ] [py-loader] Downloading pyodide-0.22.1...
|
||||
[ 0.18 request ] 200 - CACHED - https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js
|
||||
[ 0.17 console.info ] [py-loader] Downloading pyodide-x.y.z...
|
||||
[ 0.18 request ] 200 - CACHED - https://cdn.jsdelivr.net/pyodide/vx.y.z/full/pyodide.js
|
||||
...
|
||||
[ 3.59 console.info ] [pyscript/main] PyScript page fully initialized
|
||||
[ 3.60 console.log ] hello pyscript
|
||||
@@ -217,25 +217,6 @@ If you want to temporarily disable the cache, the easiest thing is to use
|
||||
If you want to clear the cache, you can use the special option
|
||||
`--clear-http-cache`:
|
||||
|
||||
```
|
||||
$ pytest --clear-http-cache
|
||||
...
|
||||
-------------------- SmartRouter HTTP cache --------------------
|
||||
Requests found in the cache:
|
||||
https://raw.githubusercontent.com/pyscript/pyscript/main/README.md
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/repodata.json
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.asm.js
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/micropip-0.1-py3-none-any.whl
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.asm.data
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.asm.wasm
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide_py.tar
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyparsing-3.0.9-py3-none-any.whl
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/distutils.tar
|
||||
https://cdn.jsdelivr.net/pyodide/v0.22.1/full/packaging-21.3-py3-none-any.whl
|
||||
Cache cleared
|
||||
```
|
||||
|
||||
**NOTE**: this works only if you are inside `tests/integration`, or if you
|
||||
explicitly specify `tests/integration` from the command line. This is due to
|
||||
how `pytest` decides to search for and load the various `conftest.py`.
|
||||
|
||||
@@ -25,7 +25,7 @@ To get started, let's create a new `index.html` file and import `pyscript.js`.
|
||||
</html>
|
||||
```
|
||||
|
||||
We are using the pyodide CDN to setup our interpreter, but you can also download the files from [the pyodide GitHub release](https://github.com/pyodide/pyodide/releases/tag/0.22.0a3), unzip them and use the `pyodide.js` file as your interpreter.
|
||||
We are using the pyodide CDN to setup our interpreter, but you can also download the files from [the pyodide GitHub releases](https://github.com/pyodide/pyodide/releases/), unzip them and use the `pyodide.js` file as your interpreter.
|
||||
|
||||
## Setting the interpreter
|
||||
|
||||
@@ -47,8 +47,8 @@ To set the interpreter, you can use the `interpreter` configuration in the `py-c
|
||||
<body>
|
||||
<py-config>
|
||||
[[interpreters]]
|
||||
src = "https://cdn.jsdelivr.net/pyodide/v0.22.0a3/full/pyodide.js"
|
||||
name = "pyodide-0.22.0a3"
|
||||
src = "https://cdn.jsdelivr.net/pyodide/v0.23.0/full/pyodide.js"
|
||||
name = "pyodide-0.23.0"
|
||||
lang = "python"
|
||||
</py-config>
|
||||
</body>
|
||||
@@ -75,8 +75,8 @@ To confirm that the interpreter is set correctly, you can open the DevTools and
|
||||
<body>
|
||||
<py-config>
|
||||
[[interpreters]]
|
||||
src = "https://cdn.jsdelivr.net/pyodide/v0.22.0a3/full/pyodide.js"
|
||||
name = "pyodide-0.22.0a3"
|
||||
src = "https://cdn.jsdelivr.net/pyodide/v0.23.0/full/pyodide.js"
|
||||
name = "pyodide-0.23.0"
|
||||
lang = "python"
|
||||
</py-config>
|
||||
<py-script>
|
||||
|
||||
Reference in New Issue
Block a user