-
-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emscripten support #3330
base: master
Are you sure you want to change the base?
Emscripten support #3330
Conversation
This is really interesting, thanks... I've taken a bit of a look at the ecosystem here, tho am going to need a bit more orientation... Would it make sense to document an example of how to write an HTML page that includes a Python REPL with httpx imported and available? |
@tomchristie I put in the PR that makes import ssl optional now (#3385 ) I updated this PR so it follows on from that PR. How this PR works now is it moves |
@tomchristie I updated this to follow the changes in master - I think #3385 is redundant now, as the ssl changes are minimal at this point. |
I'll add that I've been playing with httpx on https://pydantic.run over the last few days, both sync and async, and apart from the prints reported in pyodide/pyodide#5381, it seems to be working well otherwise! |
Co-authored-by: Samuel Colvin <[email protected]>
Co-authored-by: Samuel Colvin <[email protected]>
Oh darn, can't believe I missed those debug prints. Fixed now. |
Thanks so much @joemarshall for fixing those. @hoodmane or @joemarshall, I'm not sure what the process is (or I'd try to help), but please can we update pyodide to use the head of his PR to avoid those debug print statements confusing users. @tomchristie anything stopping this being merged? |
I think Joe Marshall already sent a pr to Pyodide to update it so when we make another release it will bring it in. |
I'm getting this error when using openai in pyodide, looks like the openai SDK is assuming something is bytes when it's actually a memoryview
Any chance the error is related to this PR? it works fine locally, and it works fine when not using their streaming responses. Happy to give more details or create a separate issue if that helps? |
I would suggest not making any PR/changes to |
Summary
I added a discussion for this ages back but there's been no input, so I've written it (because I was contracted to do the work anyway, so I might as well contribute it upstream). This PR adds support for running in emscripten / webassembly platforms, where all network connections go via the browser.
Currently in progress, but tests okay locally, so I've opened this to check the CI changes, I've got to update docs also.
Checklist