You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Third-party package that may not be available or verified for MicroPython
Fix Reference
1. @dataclass — MicroPython has no dataclasses module.
Fix: Convert to explicit __init__ with manual attribute assignment.
See: docs/micropython_migration.md §1
2. Type annotations — MicroPython does not support PEP 604 (X | Y), PEP 585 (list[str]), or the typing module.
Fix: Remove type annotations from signatures and variable declarations.
See: docs/micropython_migration.md §2
3. logging — MicroPython has no logging module.
Fix: Use a compat shim: from seedsigner.compat.logging import getLogger.
See: docs/micropython_migration.md §3
4. threading — MicroPython has only _thread, not threading. No Thread class; locks lack context manager support.
Fix: Use a compat shim: from seedsigner.compat.threading import Thread, Lock.
See: docs/micropython_migration.md §4
5. enum.IntEnum — MicroPython has no enum module.
Fix: Replace with plain class constants.
See: docs/micropython_migration.md §5
6. pathlib — MicroPython has no pathlib module.
Fix: Replace pathlib.Path with os.path equivalents.
See: docs/micropython_migration.md §6
7. gettext — MicroPython has no gettext module.
Fix: Use a compat shim: from seedsigner.compat.l10n import gettext as _.
See: docs/micropython_migration.md §7
8. unicodedata — MicroPython has no unicodedata module. NFKD normalization is critical for BIP-39 seed derivation.
Fix: Implement NFKD/NFC in seedsigner-c-modules C extension. Must validate against BIP-39 test vectors.
See: docs/micropython_migration.md §8
9. re counted repetitions — MicroPython's re does not support {n}, {m,n} counted repetitions, named groups, or non-capturing groups.
Fix: Expand {4} to four repeated character classes; use + with len() for ranges.
See: docs/micropython_migration.md §9
10. importlib — MicroPython has no importlib module.
Fix: Replace importlib.import_module('x') with __import__('x').
See: docs/micropython_migration.md §10
11. os.fsync — MicroPython has no os.fsync.
Fix: Guard with if hasattr(os, 'fsync'): os.fsync(...).
See: docs/micropython_migration.md §11
12. platform — MicroPython has no platform module.
Fix: Use os.uname() as fallback.
See: docs/micropython_migration.md §12
13. traceback — MicroPython's traceback is minimal; format_exc() may not work.
Fix: Use sys.print_exception() with io.StringIO buffer.
See: docs/micropython_migration.md §13
14. base64 — MicroPython has no base64 module (no base32 functions).
Fix: Implement pure-Python base32 or add to seedsigner-c-modules.
See: docs/micropython_migration.md §14
15. hmac — MicroPython has no hmac module.
Fix: Implement pure-Python HMAC using hashlib, or check if embit provides it.
See: docs/micropython_migration.md §15
17. Third-party dependency — Third-party package that may not be available or verified for MicroPython.
Fix: Verify package works on MicroPython 1.27 or find alternative.
See: docs/micropython_migration.md (third-party deps table)