Skip to content

Make sure load_package() fails when a url returns a 404#184

Merged
hoodmane merged 2 commits intopyodide:mainfrom
hoodmane:load-package-404-fail
Apr 21, 2026
Merged

Make sure load_package() fails when a url returns a 404#184
hoodmane merged 2 commits intopyodide:mainfrom
hoodmane:load-package-404-fail

Conversation

@hoodmane
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment thread pytest_pyodide/runner.py
Comment on lines +321 to +323
# * For a known-but-unresolvable package (e.g. a wheel URL that
# 404s), the returned promise resolves normally and the failure
# is only delivered via the ``errorCallback`` option.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(No actions required for this PR)

I wonder if we should change this behavior. I am not sure why we designed in that way at the first place.

I guess it was when loadPackage was unstable, we wanted a failure in a single package resolution failure does not block loading other packages. But now, I guess it is weird to make loadPackage silently success even when the package load fails.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed.

@hoodmane hoodmane merged commit b1b1b17 into pyodide:main Apr 21, 2026
13 of 14 checks passed
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