[Need newer pyodide] BUG: fetch_string_and_headers compat: raise in and out of pyodide
Currently only the not_in_pyodide will raise on non-success, because this is the default behavior of urllib, the in_pyodide will not, so I added a raise_for_status.
It is better to raise, as otherwise the package parser will potentially get proper URL and not manage to parse it, and decide there is no wheels, while we actually just got an error (404, or maybe 500).
In addition wraps both case in a custom local HttpStatusError, so that we can actually catch these errors in the right places when we encounter them.
I think we could define HttpStatusError on the ABC and not make it an ABC itself, but it small enough that I think duplication is ok.
Moving to draft, I think HttpStatusError is not yet in latest released pyodide.
Ok, I've added relevant fixes now that PyPI properly set CORS on 404s, and added conditional for wether we are on pyodide 0.26.x or 0.27+.
SO now some of the fixture that return 500 now need to return 404... I'm not sure how to get the httpserver fixture to return 404 on wildcard url without expecting requests.
ValueError: Function test_404_raise's first argument name 'httpserver' should start with 'selenium'
@run_in_pyodide should be the inner-most decorator.
Let's release Pyodide 0.27.0a1 and use it in the micropip CI so we don't need to put complex version checks. Hood released 0.27.0a1 yesterday but the deploy was failed because of the CI timeout (https://github.com/pyodide/pyodide/commit/5231ac0358cf3787c223d699bd36e8648de43792). Let me see if rerunning the job would work.
Let's release Pyodide 0.27.0a1 and use it in the micropip CI
I was also just concern micropip might be broken with current pyodide/warehouse, but a new version of pyodide would be great :-)
Ok, I've tried multiple variation of the test to @run_in_pyodide, but can't figure out how to actually have one that works.
I released 0.27.0a2 instead.
I released 0.27.0a2 instead.
BTW should CI be updated
- pyodide-version: [0.24.1, 0.25.0]
+ pyodide-version: [0.24.1, 0.25.0, 0.26.0, 0.27.0a2]
?
Any idea on how to actually change the timeout to something else the 10 minutes... I've tried various options with no success.
Any idea on how to actually change the timeout to something else the 10 minutes... I've tried various options with no success.
I think this is a chrome (+selenium) issue.. for now I just pinned the version of the chrome to some older version to see if it pass. https://github.com/pyodide/micropip/pull/135
I think this is a chrome (+selenium) issue.. for now I just pinned the version of the chrome to some older version to see if it pass. #135
More generally when I write a test with an error the timeout is also 10 min, and I could not find how to make it timeout in less... but thanks for #135
ok, I pushed a commit that remove compat with old versions.