From 113c7ce9a1090adca67e1b39d071b77e88425c1d Mon Sep 17 00:00:00 2001 From: Adam G Date: Tue, 5 Mar 2024 13:02:52 -0500 Subject: [PATCH] micropython/mip: Add upip.py and pip.py dummy modules 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 --- micropython/mip/manifest.py | 5 +++++ micropython/mip/pip.py | 4 ++++ micropython/mip/upip.py | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 micropython/mip/pip.py create mode 100644 micropython/mip/upip.py diff --git a/micropython/mip/manifest.py b/micropython/mip/manifest.py index 00efa545..32e130e0 100644 --- a/micropython/mip/manifest.py +++ b/micropython/mip/manifest.py @@ -2,4 +2,9 @@ metadata(version="0.2.0", description="On-device package installer for network-c require("requests") +#dummy packages for pre-v1.20.0 +module("pip.py", opt=3) +module("upip.py", opt=3) + + package("mip", opt=3) diff --git a/micropython/mip/pip.py b/micropython/mip/pip.py new file mode 100644 index 00000000..4a0df0f9 --- /dev/null +++ b/micropython/mip/pip.py @@ -0,0 +1,4 @@ +# Dummy module for upip and pip to redirect user to mip +raise ImportError("""This module has been deprecated, please instead use mip. +https://docs.micropython.org/en/latest/reference/packages.html +""") diff --git a/micropython/mip/upip.py b/micropython/mip/upip.py new file mode 100644 index 00000000..4a0df0f9 --- /dev/null +++ b/micropython/mip/upip.py @@ -0,0 +1,4 @@ +# Dummy module for upip and pip to redirect user to mip +raise ImportError("""This module has been deprecated, please instead use mip. +https://docs.micropython.org/en/latest/reference/packages.html +""")