Skip to content
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

Update pyodide to 0.25.0 #1576

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Update pyodide to 0.25.0 #1576

merged 1 commit into from
Jan 26, 2024

Conversation

hoodmane
Copy link
Contributor

And tidy up loading process:

  1. switch Python metadata from a user js module to an internal json module
  2. switch lockfile.js to a json file and add capability for builtin json modules

@hoodmane hoodmane requested review from a team as code owners January 24, 2024 22:44
@hoodmane hoodmane requested review from byule and vickykont and removed request for a team January 24, 2024 22:44
@@ -18,6 +18,7 @@ struct Module {
src @1 :Data; # JS / TS code
wasm @4 :Data; # Wasm module
data @5 :Data; # Binary data module
json @6 :Text; # Json module
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice, but I wonder if there is a reason we haven't introduced this in the past. We'll have to add this in edgeworker too I suppose and I want to make sure the team is happy with this direction (just calling it out here so hopefully if someone has objections they can call them out)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I didn't introduce this in the wasm/data PRs because I wasn't including pyodide-package.json at all then. It seems much preferable to include them as json than to try to do some brittle rewrite on the source.

scheme = url.protocol[:-1]
path = url.pathname
assert url.search[0] == '?'
assert "?".startswith(url.search[0:1])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious about this, the former is far clearer, why the change?

Copy link
Contributor Author

@hoodmane hoodmane Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url.search can also be empty, the previous assert would throw an error in this case. Probably saying

not url.search or url.search[0] == "?"

is clearer

Base automatically changed from hoodmane/fastapi to main January 25, 2024 17:58
And tidy up loading process:

1. switch Python metadata from a user js module to an internal json module
2. switch lockfile.js to a json file and add capability for builtin json modules
@hoodmane hoodmane merged commit 1d48135 into main Jan 26, 2024
11 checks passed
@hoodmane hoodmane deleted the hoodmane/update-pyodide branch January 26, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants