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

Fix regression when deps=False is set #187

Merged
merged 8 commits into from
Jan 31, 2025
Merged

Conversation

ryanking13
Copy link
Member

@ryanking13 ryanking13 commented Jan 30, 2025

resolves #180

I forgot to call await when deps is not set.

  • changelog
Not Found
@ryanking13 ryanking13 added this to the 0.9.0 milestone Jan 30, 2025
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Thanks, @ryanking13! I have one question about the code, which is just for my understanding and won't block merging.

Comment on lines +44 to +50
try:
# pyodide-micropip-test depends on snowballstemmer
import snowballstemmer # noqa: F401
except ModuleNotFoundError:
pass
else:
raise Exception("Should raise!")
Copy link
Member

Choose a reason for hiding this comment

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

As the intention here is that we want import snowballstemmer to not be installed due to deps=False, is there a better way to handle this?

i.e., is it possible to wrap it in a context manager with with pytest.raises(ModuleNotFoundError (or we have to do it in the current way because pytest isn't installed?)?

Copy link
Member Author

Choose a reason for hiding this comment

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

i.e., is it possible to wrap it in a context manager with with pytest.raises(ModuleNotFoundError (or we have to do it in the current way because pytest isn't installed?)?

Yeah, good point. pytest.raises would work too, but I wanted to keep the test simple, not loading any extra package.

@ryanking13
Copy link
Member Author

Thanks for the review!

@ryanking13 ryanking13 merged commit 83983da into pyodide:main Jan 31, 2025
8 checks passed
@ryanking13 ryanking13 deleted the deps-bug branch January 31, 2025 09:04
@agriyakhetarpal agriyakhetarpal linked an issue Feb 2, 2025 that may be closed by this pull request
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.

micropip.install() fails when deps=False micropip.freeze() fails when deps=False
2 participants