-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
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.