ENH Add micropip.uninstall() - #55
Conversation
rth
left a comment
There was a problem hiding this comment.
Thanks @ryanking13 ! A couple of minor comments otherwise LGTM.
What would happen if we uninstall a package installed via loadPackage? If it also uninstalls it, we need to be sure loadPackage would be aware of it.
I think removing keys in |
|
@rth Thanks for the review! I think I addressed all of your comments. I changed the code a bit after your review (simplified how files are retrieved, and added tests), so I would appreciate it if you can review this one more time. |
rth
left a comment
There was a problem hiding this comment.
One minor comment, otherwise LGTM. Thanks!
Related: #51
Add
micropip.uninstall()method, which uninstalls packages that are installed.I used a quite simple approach for this compared to
pip uninstall, since we only support installing wheels, and wheel metadata contain a list of files in the archive, so I just iterated through the list and removed them.I didn't add a rollback feature if uninstall fails in this PR. I'm not sure it is worth it, but probably we can add it as a follow up.