Comments (4)
Thanks for the report @kor0p!
Indeed they seem to have changed this from Chrome 119 to Chrome 120. Of course, it only reproduces if you turn on Experimental WebAssembly JavaScript Promise Integration (JSPI)
in chrome://flags
. I'd want to keep JSPI support for node v20 so we'll have to feature detect this and choose the appropriate way to get the type of a wasm function.
from pyodide.
Thanks for the test @kor0p. If you make a PR adding that to the test suite I'll merge it.
from pyodide.
@hoodmane
Thanks for quick answer
Yes, I have enabled this flag to test JSPI, so I disabled it (and reopened browser) and still can reproduce the bug here 😢
Bug is gone only when I disable flag "Experimental WebAssembly"
from pyodide.
@hoodmane Thanks a lot!
Now I can try JSPI feature as expected!
So, I went to original PR to find some examples on it (tests should be great examples, isn't it?)
And there is no tests for explicit Python PyodideFuture usage. But it works the same way, and it's great news, that we finally can syncify() it!
Here is draft for such test:
@pytest.mark.xfail_browsers(safari="No JSPI on Safari", firefox="No JSPI on firefox")
def test_syncify_create_task(selenium):
selenium.run_js(
"""
await pyodide.runPythonSyncifying(`
import asyncio
async def test():
await asyncio.sleep(0.1)
return 7
task = asyncio.create_task(test())
assert task.syncify() == 7
del test, task
`);
"""
)
from pyodide.
Related Issues (20)
- `zstandard` HOT 1
- pyodide build should read settings from pyproject.toml HOT 10
- webloop should support cancellation HOT 2
- Mac builds: Pyodide Venv: `pytest` breaks when `python -m pytest` does not HOT 10
- `Downloading Pyodide` slightly confusing for CDN usage HOT 1
- issue using pygame-ce HOT 9
- Pyodide config recipe broken in 0.26.0 HOT 3
- Error when loading bundled python packages using Pyodide from NPM HOT 6
- scipy.integrate.dblquad gives very wrong result even for the simplest integrations HOT 21
- wrong behavior when setting item on a PyProxyJsonAdaptor HOT 2
- Wrong typing for `create_proxy` and `create_once_callable`
- imported module not found in class in pyodide, error "NameError: name 'urllib3' is not defined" HOT 4
- rasterio: Add package request HOT 1
- Pandas is sending DeprecationWarning in 0.26.0 HOT 1
- RFC Vendor shared libraries to the wheel by default HOT 7
- memoize in loadDynlibsFromPackage has no effect HOT 7
- rerun-sdk HOT 1
- Unknown typed array type 'BigInt64Array' when using transformers v3 with Xenova/Phi-3-mini-4k-instruct HOT 1
- NumPy: `numpy.linalg.LinAlgError` not thrown HOT 2
- Imports in the REPL cause infinite recursion error (0.26.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyodide.