-
Notifications
You must be signed in to change notification settings - Fork 586
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
Test against Pyodide / Emscripten in CI #3870
Conversation
b0648e2
to
c981939
Compare
I'm amazed this works at all. Will review later. |
pyodide_version = re.findall( | ||
f"pyodide_build-{vers_re}-py3-none-any.whl", | ||
requests.get("https://pypi.org/simple/pyodide-build/").text, | ||
)[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure it's always sorted? Anyways: https://pypi.org/pypi/pyodide-build/json provides the .info.version
field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That gives us the most recent release, but we want the largest non-prerelease version which means we can't use the json endpoint. We use the regex to exclude pre-releases, but I've also switched from indexing to max()
so we won't pick up a newer release of e.g. a patch backported to an older minor version - which hasn't happened yet and seems unlikely at zerover, but it's easy to handle 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! And of course the proof is in the pudding: it works.
I'd suggest changing the PyPI URL and parsing, but otherwise good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #3437, after a fair bit of hacking.
I'm particularly pleased about automatically updating the pinned versions; doing so from our weekly cronjob will go a long way towards avoiding compatibility bitrot as upstream changes. (which I think is why https://zhd.dev/ghostwriter/ stopped working 😿)