Skip to content

NodeJS + pyodide support  #3400

@joemarshall

Description

@joemarshall

Context

Recently released Pyodide 0.26.0 supports webassembly Javascript Promise Integration. This means it is practical to do synchronous http requests in webassembly python using the standard (asynchronous) node-fetch api.

This would make urllib3 work in webassembly on node.js supporting platforms such as Cloudflare workers.

Once support for JSPI is released generally in browsers, it would be possible to unify the webassembly support to use this, which removes the need for web-workers for streaming http requests and would simplify the emscripten backend.

Alternatives

It is possible to hack in node support using the node xmlhttprequest module, but the way that synchronous requests are handled is gross - it has to launch processes to handle them, and it is not a usable hack for server side python code.

Duplicate

I don't think so. I think I mentioned it as future work when making the pyodide browser support.

Contribution

I'm contracted to do this work already, and would like to upstream it once it is working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy