Skip to content

Improve documentation and error reporting for lack of networking in Pyodide and PyScript #633

@tiran

Description

@tiran

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a duplication
  • I already searched in Google and didn't find any good information or help

What is the issue/comment/problem?

It appears to me that lots of users are surprised by the fact that networked-based Python programs do not work in Pyodide and PyScript. They try to use Python packages like requests or database connectors, and run into all sorts of errors that are hard to understands. Missing _ssl extension is a common problem.

However it is a red herring for a much bigger issue. Networking in Emscripten does not work like on Linux or Windows-like systems. It's not just the fact that blocking sockets are not supported, because they would block the browser loop. Browser also do not permit raw TCP and UDP sockets due to their potential for abuse. The direct socket proposal may make some forms of raw connections possible in the future.

In the mean time PyScript and Pyodide should provide documentation and better error reporting (if possible). It would spare users from running into the problem over and over again and reduce frustration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogissue has been triaged but has not been earmarked for any upcoming releasetype: featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions