Add pyodide-interrupt package (#852)

This commit is contained in:
Dexter Chua 2020-12-14 16:16:13 +08:00 committed by GitHub
parent c7c445e83c
commit a012a6677b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View File

@ -27,6 +27,9 @@
- Drop support for serving .wasm files with incorrect mime type.
- Replace C lz4 implementation with (upstream) javascript implementation.
[#851](https://github.com/iodide-project/pyodide/pull/851)
- New package
[pyodide-interrupt](https://pypi.org/project/pyodide-interrupts/), useful for
handling interrupts in Pyodide (see project descripion for details).
## Version 0.15.0
*May 19, 2020*

View File

@ -0,0 +1,11 @@
package:
name: pyodide-interrupts
version: 0.1.1
source:
url: https://files.pythonhosted.org/packages/b1/c2/918c52e47bf91570d9883a1c761c4d78a59cf4d1d8f8c67c25a4e164ff87/pyodide-interrupts-0.1.1.tar.gz
sha256: b85bc38b92cd5c35dd1a5192a71495abe4cd57eadccfacbc0421fb44fb6c9e74
test:
imports:
- pyodide_interrupts

View File

@ -0,0 +1,17 @@
def test_pyodide_interrupts(selenium):
selenium.load_package("pyodide-interrupts")
selenium.run("from pyodide_interrupts import check_interrupts")
assert (
selenium.run(
"x = 0\n"
"def callback():\n"
" global x\n"
" print('check')\n"
" x += 1\n"
"with check_interrupts(callback, 10):\n"
" for i in range(50):\n"
" print(i, end=',')\n"
"x"
)
== 11
)