-
Notifications
You must be signed in to change notification settings - Fork 262
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
wasm support #106
Comments
The next release of Pyodide will be able to load binary wheels with micropip. Hopefully we'll have an alpha release in the next few days. |
Woop Woop, that's great news. Thanks @hoodmane. |
I am happy to help out with CI. I am still trying to get improvements for the emscripten target into Rust. If they merge a few more PRs it will significantly simplify the complexity of the flags needed to build Rust code. Though I suppose that is all handled by maturin so it probably won't affect you directly. There are also some warts in Pyodide, namely that we make it strangely hard to install a wheel from the local Emscripten filesystem with |
#110 added the emscripten wheel building part, I'd wait for a new pyodide release to add the pytests part. |
#110 looks great, just one tiny suggestion and otherwise we can merge it. Since pypi won't at present accept wasm wheels, could we add those files (and indeed all wheels) to the release in github? Then it looks from micropip's docs like we could install pydantic-core from the github URL? @hoodmane do you know of any other projects running unit tests with wasm/pyiodide? Might be a useful starting point to add the target to the |
Is there anything else we need to do in this repo for this? |
How about let's keep this open until we release the stable Pyodide v0.21.0. I expect to come back with some improvements in v0.21.0a3. |
Sounds good. |
Fix for the terminal output: |
amazing, what did you do about pytest-benchmark? |
pytest-benchmark needs a patch to remove |
I'm just fixing wasm tests in #148, tests are now passing on CI, but I get the following error on macos M1:
Not sure if this is expected, @hoodmane should I report it? |
No it's not expected. Someone else reported a problem with this but it was a pretty low quality bug report so I don't think I responded. Which browser do you see it on? |
Oh right it's on node. |
Another issue, as per this build, hypothesis has discover an overflow issue with datetime:
cc @Zac-HD if you're interested, not sure if anyone else is using hypothesis to test code in pyiodide. See pyodide/pyodide#2841. |
I've submitted an issue pyodide/pyodide#2840. |
Hmm, not quite sure what Hypothesis should do here, I need to check how CPython handles such platforms. Definitely glad to have the report though, and will probably add Pyodide to our CI 😊 |
@Zac-HD I assume hypothesis is doing nothing wrong, you can get the error with just |
Closing this, tests have been passing on wasm for a while and we have the demo of tests running in the browser. |
Hello, I used pydantic 1.x in pyodide before but I would like to use the 2.x. I know it is available from the previous message of @samuelcolvin. Is it because the wheels are not published? It looks like that for the automated tests in pyodide, pydantic is being installed from an url. Is there any chance to have the 2.x wheels branch to pypi? If given some directions, I could contribute the code. |
It's not currently allowed to upload Pyodide wheels to pypi. |
Thank you @hoodmane, I didn't know. |
I really want pydantic-core to support wasm. This is mostly so that the examples in pydantic's docs can be edited and run in the browser, but also for wider use of pydantic.
As per PyO3/pyo3#2412 (comment), it looks like it should be possible.
But I'm not sure how to integrate that with maturin github actions. @messense any pointers? Or would you be willing to submit a PR?
Also, as well as getting wheels to build, what more do we need to do to get pydantic-core working with pyiodide?
The text was updated successfully, but these errors were encountered: