From 353f584af33f6953acc4857920bdfe4f06196d65 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:04:27 -0400 Subject: [PATCH 01/12] lora-sx126x,lora-sx127x: Add dependencies for sync/async modems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lora-sx126x and lora-sx127x packages create SyncModem and AsyncModem classes by importing from lora.sync_modem and lora.async_modem modules, which are provided by the lora-sync and lora-async extension packages respectively. However, the manifest.py files for these hardware driver packages did not require lora-sync or lora-async as dependencies. This meant that when users installed lora-sx126x or lora-sx127x, they would get the hardware driver but not the modem wrapper classes needed to actually use it. This commit adds the missing dependencies and increments the patch versions (0.1.5→0.1.6 for sx126x, 0.1.2→0.1.3 for sx127x), so users will receive the fixed packages. Also fixed error handling in lora/__init__.py where ImportError would be raised incorrectly when the second hardware driver import failed, even if the first one had succeeded. Signed-off-by: Breno RdV --- micropython/lora/lora-sx126x/manifest.py | 4 +++- micropython/lora/lora-sx127x/manifest.py | 4 +++- micropython/lora/lora/lora/__init__.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/micropython/lora/lora-sx126x/manifest.py b/micropython/lora/lora-sx126x/manifest.py index 76fa91d8d..58076e94f 100644 --- a/micropython/lora/lora-sx126x/manifest.py +++ b/micropython/lora/lora-sx126x/manifest.py @@ -1,3 +1,5 @@ -metadata(version="0.1.5") +metadata(version="0.1.6") require("lora") +require("lora-sync") +require("lora-async") package("lora") diff --git a/micropython/lora/lora-sx127x/manifest.py b/micropython/lora/lora-sx127x/manifest.py index 177877091..766af5b43 100644 --- a/micropython/lora/lora-sx127x/manifest.py +++ b/micropython/lora/lora-sx127x/manifest.py @@ -1,3 +1,5 @@ -metadata(version="0.1.2") +metadata(version="0.1.3") require("lora") +require("lora-sync") +require("lora-async") package("lora") diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 7f8930b8c..e62e5ae5a 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -20,7 +20,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if "no module named 'lora." not in str(e) and not ok: raise try: @@ -28,7 +28,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if "no module named 'lora." not in str(e) and not ok: raise From d41c370a21c95b6b6016c64351f6427ac7c5d6fc Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:46:35 -0400 Subject: [PATCH 02/12] lora/__init__.py: ImportError would be raised incorrectly when the second hardware driver import failed, because the error message would contain "lib.lora" instead of just "lora.". Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index e62e5ae5a..0c2a021b2 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -5,6 +5,10 @@ ok = False # Flag if at least one modem driver package is installed +def _can_ignore_error(e): + """Check if ImportError can be ignored due to missing module.""" + return all(x in str(e) for x in ["no module named", "lora"]) + # Various lora "sub-packages" try: @@ -12,7 +16,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if not _can_ignore_error(e): raise try: @@ -20,7 +24,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise try: @@ -28,7 +32,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise @@ -38,3 +42,6 @@ ) del ok + + +__version__ = '0.2.1' From 32518763b342645f24ee5c91b08f7988c9c8e0d6 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:04:27 -0400 Subject: [PATCH 03/12] micropython/lora/lora-sx126x/manifest.py: Add dependencies for sync/async modems. micropython/lora/lora-sx127x/manifest.py: Add dependencies for sync/async modems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lora-sx126x and lora-sx127x packages create SyncModem and AsyncModem classes by importing from lora.sync_modem and lora.async_modem modules, which are provided by the lora-sync and lora-async extension packages respectively. However, the manifest.py files for these hardware driver packages did not require lora-sync or lora-async as dependencies. This meant that when users installed lora-sx126x or lora-sx127x, they would get the hardware driver but not the modem wrapper classes needed to actually use it. This commit adds the missing dependencies and increments the patch versions (0.1.5→0.1.6 for sx126x, 0.1.2→0.1.3 for sx127x), so users will receive the fixed packages. Also fixed error handling in lora/__init__.py where ImportError would be raised incorrectly when the second hardware driver import failed, even if the first one had succeeded. Signed-off-by: Breno RdV --- micropython/lora/lora-sx126x/manifest.py | 4 +++- micropython/lora/lora-sx127x/manifest.py | 4 +++- micropython/lora/lora/lora/__init__.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/micropython/lora/lora-sx126x/manifest.py b/micropython/lora/lora-sx126x/manifest.py index 76fa91d8d..58076e94f 100644 --- a/micropython/lora/lora-sx126x/manifest.py +++ b/micropython/lora/lora-sx126x/manifest.py @@ -1,3 +1,5 @@ -metadata(version="0.1.5") +metadata(version="0.1.6") require("lora") +require("lora-sync") +require("lora-async") package("lora") diff --git a/micropython/lora/lora-sx127x/manifest.py b/micropython/lora/lora-sx127x/manifest.py index 177877091..766af5b43 100644 --- a/micropython/lora/lora-sx127x/manifest.py +++ b/micropython/lora/lora-sx127x/manifest.py @@ -1,3 +1,5 @@ -metadata(version="0.1.2") +metadata(version="0.1.3") require("lora") +require("lora-sync") +require("lora-async") package("lora") diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 7f8930b8c..e62e5ae5a 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -20,7 +20,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if "no module named 'lora." not in str(e) and not ok: raise try: @@ -28,7 +28,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if "no module named 'lora." not in str(e) and not ok: raise From d2f2cf3cccd3bedf7dca9d4439c7db03ff57bf9c Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:46:35 -0400 Subject: [PATCH 04/12] micropython/lora/lora/lora/__init__.py: ImportError would be raised incorrectly when the second hardware driver import failed, because the error message would contain "lib.lora" instead of just "lora.". Signed-off-by: Breno RdV Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index e62e5ae5a..0c2a021b2 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -5,6 +5,10 @@ ok = False # Flag if at least one modem driver package is installed +def _can_ignore_error(e): + """Check if ImportError can be ignored due to missing module.""" + return all(x in str(e) for x in ["no module named", "lora"]) + # Various lora "sub-packages" try: @@ -12,7 +16,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if not _can_ignore_error(e): raise try: @@ -20,7 +24,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise try: @@ -28,7 +32,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise @@ -38,3 +42,6 @@ ) del ok + + +__version__ = '0.2.1' From f3a96086380cc39cb974f123dddbc24d6565e81a Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:46:35 -0400 Subject: [PATCH 05/12] micropython/lora/lora/lora/__init__.py: ImportError would be raised incorrectly when the second hardware driver import failed. The reason is that the error message would contain "lib.lora" instead of just "lora.". Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index e62e5ae5a..0c2a021b2 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -5,6 +5,10 @@ ok = False # Flag if at least one modem driver package is installed +def _can_ignore_error(e): + """Check if ImportError can be ignored due to missing module.""" + return all(x in str(e) for x in ["no module named", "lora"]) + # Various lora "sub-packages" try: @@ -12,7 +16,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e): + if not _can_ignore_error(e): raise try: @@ -20,7 +24,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise try: @@ -28,7 +32,7 @@ ok = True except ImportError as e: - if "no module named 'lora." not in str(e) and not ok: + if not _can_ignore_error(e): raise @@ -38,3 +42,6 @@ ) del ok + + +__version__ = '0.2.1' From ccb26f3883c6f9f9bea4dd5a0d506d69737f6d44 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:04:27 -0400 Subject: [PATCH 06/12] micropython/lora/lora-sx126x/manifest.py: Add dependencies for sync/async modems. micropython/lora/lora-sx127x/manifest.py: Add dependencies for sync/async modems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lora-sx126x and lora-sx127x packages create SyncModem and AsyncModem classes by importing from lora.sync_modem and lora.async_modem modules which are provided by the lora-sync and lora-async extension packages respectively. However, the manifest.py files for these hardware driver packages did not require lora-sync or lora-async as dependencies. This meant that when users installed lora-sx126x or lora-sx127x, they would get the hardware driver but not the modem wrapper classes needed to actually use it. This commit adds the missing dependencies and increments the patch versions (0.1.5→0.1.6 for sx126x, 0.1.2→0.1.3 for sx127x), so users will receive the fixed packages. Also fixed error handling in lora/__init__.py where ImportError would be raised incorrectly when the second hardware driver import failed, even if the first one had succeeded. Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 0c2a021b2..efdf953b5 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -44,4 +44,4 @@ def _can_ignore_error(e): del ok -__version__ = '0.2.1' +__version__ = "0.2.1" From f63a8d9d3841e02ca10e27d7e8ea9371653ba27f Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Fri, 7 Nov 2025 22:43:51 -0500 Subject: [PATCH 07/12] lora/__init__.py: Removed unnecessary line. Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index efdf953b5..2f7767382 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,6 +42,3 @@ def _can_ignore_error(e): ) del ok - - -__version__ = "0.2.1" From 9950c9735da53b6216171dd7f72fb9931a790419 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Fri, 7 Nov 2025 22:44:25 -0500 Subject: [PATCH 08/12] lora/__init__.py: Removed unnecessary line. Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 0c2a021b2..2f7767382 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,6 +42,3 @@ def _can_ignore_error(e): ) del ok - - -__version__ = '0.2.1' From 9b4cb4d6ae8afd2b4f0f5522f1254312ee41b899 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:46:35 -0400 Subject: [PATCH 09/12] micropython/lora/lora/lora/__init__.py: Fix ImportError showing "lib.lora" instead of "lora" on driver import failure Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 2f7767382..0c2a021b2 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,3 +42,6 @@ def _can_ignore_error(e): ) del ok + + +__version__ = '0.2.1' From e19784a274566907e4371576a51192e9198c45c8 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:04:27 -0400 Subject: [PATCH 10/12] lora-sx126x,lora-sx127x: Add dependencies for sync/async modems. Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 0c2a021b2..2f7767382 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,6 +42,3 @@ def _can_ignore_error(e): ) del ok - - -__version__ = '0.2.1' From 1b6c796e6b9741cb4a210a780e9dd91e977082f7 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Tue, 30 Sep 2025 19:46:35 -0400 Subject: [PATCH 11/12] lora/__init__.py: ImportError would be raised incorrectly when the second hardware driver import failed, because the error message would contain "lib.lora" instead of just "lora.". Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 2f7767382..0c2a021b2 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,3 +42,6 @@ def _can_ignore_error(e): ) del ok + + +__version__ = '0.2.1' From 117f1a086f17ba6bae463564003c127e34cee88b Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Fri, 7 Nov 2025 22:44:25 -0500 Subject: [PATCH 12/12] lora/__init__.py: Removed unnecessary line. Signed-off-by: Breno RdV --- micropython/lora/lora/lora/__init__.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/micropython/lora/lora/lora/__init__.py b/micropython/lora/lora/lora/__init__.py index 0c2a021b2..2f7767382 100644 --- a/micropython/lora/lora/lora/__init__.py +++ b/micropython/lora/lora/lora/__init__.py @@ -42,6 +42,3 @@ def _can_ignore_error(e): ) del ok - - -__version__ = '0.2.1'