Skip to content

Fix regression when deps=False is set#187

Merged
ryanking13 merged 8 commits intopyodide:mainfrom
ryanking13:deps-bug
Jan 31, 2025
Merged

Fix regression when deps=False is set#187
ryanking13 merged 8 commits intopyodide:mainfrom
ryanking13:deps-bug

Conversation

@ryanking13
Copy link
Copy Markdown
Member

@ryanking13 ryanking13 commented Jan 30, 2025

resolves #180

I forgot to call await when deps is not set.

  • changelog

@ryanking13 ryanking13 added this to the 0.9.0 milestone Jan 30, 2025
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Thanks for the review!

@ryanking13 ryanking13 merged commit 83983da into pyodide:main Jan 31, 2025
6 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