Giter VIP home page Giter VIP logo

Comments (4)

hoodmane avatar hoodmane commented on June 12, 2024 1

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.

hoodmane avatar hoodmane commented on June 12, 2024 1

Thanks for the test @kor0p. If you make a PR adding that to the test suite I'll merge it.

from pyodide.

kor0p avatar kor0p commented on June 12, 2024

@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 😢

Screenshot from 2024-01-15 09-42-13

Bug is gone only when I disable flag "Experimental WebAssembly"

from pyodide.

kor0p avatar kor0p commented on June 12, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.