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

Add upip.py and pip.py dummy modules for reverse "compatibility" #820

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adammakesthingsdev
Copy link

Hi all, first PR here. Let me know if I did something wrong.
I noticed many packages in various places (github, Python package index, blogs/guide websites, etc) still guide users to install either from a custom index like PyPi or micropython-lib using upip. As of v1.20.0 these are both deprecated by mip and removed, leaving users confused with a module not found error.
My simple fix is 2 dummy packages bundled with mip that when imported throw an ImportError with an explanation and link to the Micropython page on package management with mip, which for me was surprisingly difficult to find without knowing the new name "mip" (which doesn't follow the old pattern of "u"+package name many are familiar with.) It certainly would have saved me a bit of time.
Assuming my fork has no formatting issues (functionality is fine, tested on ESP32 w/ mip) I can't see why it would be a problem - it's a lightweight fix and other deprecated/renamed modules have done this or similar so there's precedent.
Thanks for reviewing!

Added upip.py and pip.py, identical. These files throw an ImportError.
mip\'s manifest.py also altered to load as modules.
The purpose is to alert users guided to install with deprecated pip/upip
(prior to 1.20.0) to instead use mip.

Signed-off-by: Adam G <adam@adammakesthings.dev>
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.

None yet

1 participant