Skip to content

Pyodide compatibility?Β #1333

@hoodmane

Description

@hoodmane

Would you be willing to accept patches to make this package work with Pyodide? Before version 1.2.0, it worked with Pyodide but from version 1.2.0 it fails with

RuntimeError: Runner.run() cannot be called from a running event loop

I'm not sure if this is better fixed in Pyodide or pytest-asyncio, probably it's better to fix in Pyodide. I think the cause of the issue is that Pyodide's WebLoop event loop doesn't handle lifecycle events. For instance, stop() is a no op. This is because our event loop schedules events on the JavaScript event loop and we have no control over the JavaScript event loop. But perhaps we can fake lifecycle events well enough to satisfy pytest-asyncio's needs.

Anyways if there is any interest it would be nice to add Pyodide to pytest-asyncio's CI once we get this working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions