-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add tests #1
Comments
Thanks for your kind works, @rth! The reason for me to use the patch is that I always need some boiler-plate code to make it work. And in this case I made sure the patch doesn't break anything when it's not needed; in non-pyodide environments. Regarding the binary files, I first had a different implementation (not in this repo) with I like your proposal on the API. Let me change that. Let me also look into |
Yeah, JupyterLite runs in a webworker, so in any case, so it should not be a problem there. FYI in related projects there are https://github.com/emscripten-forge/requests-wasm-polyfill and work by @bartbroere in pyodide/pyodide#1956. Once this package is a bit more used and tested in the future we could consider adding it to the pyodide Github org, if that's something that interests you.
If you have any questions or things not working as expected please don't hesitate opening issues there. That package is fairly new. |
I’ve been trying to get the test dependencies working. Is it supported to work on macOS with python3.10? When I try to start it it says something about missing node-fetch package. Is there somewhere a fully working example I can copy and adjust? |
If you want to run tests in node, see https://www.npmjs.com/package/pyodide section "Node.js versions <0.17", yes, you would need to install I recently added tests in pyodide/micropip#3 you can adapt If anything is unclear (including the docs), please feel free to complain at https://github.com/pyodide/pytest-pyodide as I believe you are one of the first users of this package :) FIY, there is some interest in making requests work in jjjake/internetarchive#550 (waiting for their response, following a discussion on Twitter). If you have anything to add don't hesitate to comment there. If they go that road, they might need to improve this package as well, since they use a lot of the requests API, some of which currently still doesn't work with |
Thank you @rth! I'll check your example somewhere this week. |
Fixed in #12 ! Thanks again to @joemarshall ! |
Nice work on this!
I think API wise having an explicit patch method is indeed a reasonable compromise to issue of how to make requests available (related pyodide/micropip#9). Maybe slightly more flexible,
so that it's easier to extend to other packages, without adding too many of those methods.
In the end, does this work for you for binary files (in the main thread)? I'm no longer sure what the situation is there pyodide/pyodide#3062
It would be nice to add some CI and tests e.g. using pytest-pyodide.
The text was updated successfully, but these errors were encountered: