Skip to content

Don't raise HTTPStatusError on CORS errors when querying packages in a transaction #225

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

agriyakhetarpal
Copy link
Member

Description

See #223; this PR changes the behaviour to not stop at CORS errors when querying an index. This should serve as a temporary respite when installing from indices that don't add CORS headers for 404s and the like, such as Anaconda.org.

@agriyakhetarpal agriyakhetarpal marked this pull request as draft March 26, 2025 18:34
@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review March 26, 2025 18:56
@agriyakhetarpal
Copy link
Member Author

@ryanking13, is this what you had in mind?

Copy link
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.

@ryanking13, is this what you had in mind?

Yes, exactly. I think you can remove HttpStatusError from the compatibility code as it is not imported anymore.

@agriyakhetarpal
Copy link
Member Author

Okay, done! I have to say this is a part of micropip's code I haven't worked with or reviewed before (I think), so I'll let you comment on the specifics or if you require any more changes.

Copy link
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.

Left a minor comment. Otherwise looks good. Thanks!

@@ -13,14 +13,6 @@ class CompatibilityLayer(ABC):
All of the following methods / properties must be implemented for use both inside and outside of pyodide.
"""

class HttpStatusError(ABC, Exception):
Copy link
Member

Choose a reason for hiding this comment

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

Please remove it from here and here too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in abc1437; I didn't realise you were asking to remove HttpStatusErrors completely.

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.

2 participants