Merge upstream micropython master (for m_tracked_realloc and other 1.25-1.29 changes)

AN
5mo ago
+95271-20011

Why now

An open PR against lvgl/lvgl (https://github.com/lvgl/lvgl/pull/10106) needs MicroPython's m_tracked_realloc, which landed upstream as commit 18735dde3becfee023f3ecf33ff36cfe1c7f5cc3 on 2026-04-08, after v1.29.0-preview was cut. The most recent tag therefore doesn't cover it, so this sync uses upstream/master (8ecd995041c2c65fd1d69f9f4b0bb763272d8f83) directly rather than a tag.

What's included

Merges micropython/micropython master at 8ecd995041c2c65fd1d69f9f4b0bb763272d8f83 into lv_micropython master. That's 2098 upstream commits since the last sync (v1.24.1, commit 06ebf74c1), spanning 1.25, 1.26, 1.27, 1.28 and the in-development 1.29.

The version bump is reflected in py/mpconfig.h: 1.24.1 → 1.29.0-pre.

Why master instead of a tag

m_tracked_realloc is not in any tag yet. Waiting for 1.29 to be cut is open-ended. The PR follows the historical pattern (merge upstream, no cherry-pick, no rebase) — just against master rather than a tag.

Conflict resolutions

15 files had conflicts. Trivial ones (additive blocks in different parts of the same file) were merged by taking both sides. The non-trivial ones:

  • .gitmodules — kept upstream's added alif submodules (alif_ensemble-cmsis-dfp, alif-security-toolkit), kept the user_modules/lv_binding_micropython entry, and adopted upstream's micropython/nxp_driver URL. The previous hathach/nxp_driver URL was drift from before upstream's rename in v1.27.0 (commit bd7342d9e), not a deliberate local change.
  • .gitignore, .github/workflows/ruff.yml, ports/esp32/mpconfigport.h, py/misc.h — additive merges. The local LVGL define block in mpconfigport.h (MICROPY_ENABLE_SCHEDULER, MICROPY_MODULE_BUILTIN_INIT, MICROPY_PY_SYS_SETTRACE=0) and the local XC16 branch in misc.h were preserved alongside the upstream changes.
  • extmod/network_cyw43.c — pure upstream addition (STA disconnect on inactive). Other recent cyw43 fixes were cherry-picked into both sides and converged cleanly.
  • py/mpconfig.h — took upstream's version (1.29.0-pre).
  • ports/esp32/machine_pwm.c, machine_touchpad.c — took upstream entirely. Upstream dropped ESP-IDF <v5.2 / <v5.3 support and rewrote both files. The lv_micropython local fixes were cherry-picks of fixes that landed upstream first and are now superseded.
  • ESP32 partition CSVs — upstream restructured to auto-detect flash size (commit 6201e77999), deleting most partitions-*.csv files and removing vfs entries from the survivors. Adopted upstream's layout. The lv_micropython local CSV adjustments (which enlarged app partitions for LVGL firmware) are obsolete under auto-detect. Follow-up needed: ESP32 LVGL board configs may need partition tweaks to fit the LVGL firmware size in the new layout.

Testing

Built ports/unix with VARIANT=lvgl (this variant exists specifically to exercise the binding under the unix port). Build succeeds:

LINK build-lvgl/micropython
   text	   data	    bss	    dec	    hex	filename
1994540	 236864	   3120	2234524	 22189c	build-lvgl/micropython

Smoke test: micropython -c 'import lvgl as lv; print(len(dir(lv)))' reports 560 attributes on the lvgl module — module loads, binding exposes the LVGL API surface, no missing-symbol errors.

Other ports were not built. ESP32 needs sdkconfig fix-ups for the new partition layout before its CI will be green; that's the main known regression to address as a follow-up.


Summary by cubic

Syncs this fork with upstream MicroPython master to bring in m_tracked_realloc and all changes up to 1.29.0-pre, unblocking the LVGL binding work and modernizing CI/docs. Conflicts were resolved to keep LVGL-specific config and user_modules/lv_binding_micropython; unix VARIANT=lvgl builds and loads lvgl successfully.

  • Dependencies

    • Submodules: added Alif dependencies; switched lib/nxp_driver to micropython/nxp_driver; kept user_modules/lv_binding_micropython.
    • CI: new reusable ESP32 setup action; workflows bumped to actions/*@v6; Windows matrix simplified; code style tools updated (ruff, codespell).
    • Version: bumped to 1.29.0-pre; docs refreshed and expanded across many modules.
  • Migration

    • ESP32 partitions now auto-detect flash size; upstream removed most partitions-*.csv and VFS entries. Update LVGL ESP32 board configs/partitions as needed to fit firmware.
    • ESP-IDF: oldest supported is v5.3 (CI tests v5.3 and v5.5.1). Ensure builds use a supported IDF; older IDF support was dropped upstream.