Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1427 commits
Select commit Hold shift + click to select a range
60fa4ab
py/objfun: Move decl of mp_obj_fun_get_name to objfun.h.
dpgeorge Jan 13, 2026
512da03
py/objfun: Rename mp_obj_fun_get_name to mp_obj_fun_bc_get_name.
dpgeorge Jan 25, 2026
1199015
py/objlist: Move all list helper declarations to objlist.h.
dpgeorge Jan 13, 2026
8c1462b
py/objlist: Make three list helper functions inline.
dpgeorge Jan 25, 2026
90f259f
py/objtuple: Move all tuple helper declarations to objtuple.h.
dpgeorge Jan 13, 2026
71b6a85
py/objtuple: Make mp_obj_tuple_get an inline function.
dpgeorge Jan 25, 2026
b2073a0
py/emitinlinextensa: Refactor handling of selected opcodes.
agatti Dec 10, 2025
53d9004
py/objarray: Avoid double zero init on sized bytearrays.
Gadgetoid Feb 4, 2026
1095bbb
py/objstr: Avoid double zero init on sized bytes.
Gadgetoid Feb 4, 2026
ee99014
tests/run-tests.py: Broaden the check for raw REPL failure.
dpgeorge Feb 6, 2026
ed7bfcb
esp32: Add LDO driver for ESP32-P4.
artemy Dec 17, 2025
a63cc63
esp32/mphalport: Actually read from dupterm in mp_hal_stdin_rx_chr().
m-u-xyz Dec 22, 2025
5e04827
esp32: Increase minimum CMake version to 3.16.
projectgus Jan 22, 2026
3ca2722
esp32: Fix linker errors with CMake <3.25 and libbtree.
projectgus Jan 22, 2026
115f413
docs/library/network.PPP: Document the optional poll() argument.
projectgus Jan 29, 2026
0b150d7
mimxrt/boards/PHYBOARD_RT1170: Update use of mp_handle_pending().
dpgeorge Feb 6, 2026
633a27b
extmod: Ensure stream ioctl's are a no-op for unknown requests.
DvdGiessen Nov 6, 2025
71866ed
py/stream: Use detailed error strings for TLS sockets.
DvdGiessen Oct 13, 2025
3332e1e
py/objzip: Adjust zip iter code to not use mp_obj_tuple_del.
dpgeorge Jan 13, 2026
a2aad14
py/objtuple: Remove unused mp_obj_tulpe_del function.
dpgeorge Jan 13, 2026
1ebeee0
windows: Compile printf.c for the msvc port.
stinos Feb 4, 2026
eaf03bd
py/gc: Trace all marked heads in debug log.
stinos Feb 4, 2026
39d777c
py/gc: Differentiate between root and subtree pointers for debug log.
stinos Feb 4, 2026
dc91fa6
py/misc: Fix truncating cast to char.
stinos Feb 5, 2026
9dcad25
py/emitinlinextensa: Add inline assembler support for windowed cores.
agatti Jan 28, 2026
b7d7a26
py/emitinlinextensa: Refactor handling of selected narrow opcodes.
agatti Feb 5, 2026
588fa2b
extmod/modlwip: Always set the lwip_socket_ioctl() return value.
robert-hh Feb 7, 2026
92d64ca
zephyr/Kconfig: Resolve build problem with multiple FatFs libs.
maass-hamburg Jan 23, 2026
05c2f88
zephyr/main: Put GC heap in noinit linker area.
maass-hamburg Feb 4, 2026
6ae08ea
zephyr/modzsensor: Add additional sensor type constants.
maass-hamburg Feb 5, 2026
9721955
zephyr: Add support for RISC-V RV32IMC native code emitter.
maass-hamburg Feb 3, 2026
a8b7155
shared/readline: Handle \r and \n correctly as a newline.
maass-hamburg Jan 22, 2026
b892461
stm32: Convert port to use new event waiting functions.
dpgeorge Jan 13, 2026
f949806
stm32/boards: Add UARTs to NUCLEO F746ZG and NUCLEO F439ZI.
mdaeron Jan 24, 2026
746e2c9
stm32: Update STM32U5 suppport.
yn386 Feb 1, 2026
fd009e6
stm32/boards: Add WeAct STM32U585 board support.
yn386 Feb 1, 2026
7e1f754
stm32/boards/stm32l072xz.ld: Correct comment in linker script.
tompropst Feb 3, 2026
d278d6b
stm32/pin: Reduce footprint of pin structures.
agatti Feb 17, 2026
43cfbbb
stm32: Support more stm32g4 variants.
tompropst Feb 21, 2026
9dea789
webassembly: Convert port to use new event waiting functions.
dpgeorge Jan 14, 2026
8834330
nrf/mpconfigport: Remove duplicate help and open from builtins module.
dpgeorge Jan 14, 2026
de7e360
pic16bit/mpconfigport: Remove dummy builtins.open function.
dpgeorge Jan 14, 2026
1e164be
powerpc/mpconfigport: Remove dummy builtins.open function.
dpgeorge Jan 14, 2026
1ab9b66
zephyr/mpconfigport: Remove duplicate builtins.open definition.
dpgeorge Jan 14, 2026
c1ed5f7
lib/libhydrogen: Update to latest release.
ant9000 Feb 13, 2026
9e2df2d
rp2/boards/POLOLU_ZUMO_2040_ROBOT: Remove header file.
Feb 13, 2026
158cbd6
rp2: Switch all RNG sources from ROSC to pico_rand.
mimi89999 Feb 18, 2026
f02dc6d
esp32/esp32_rmt: Release GIL while waiting for TX done.
DvdGiessen Feb 16, 2026
b46f9f5
py/asmthumb: Do not clobber index register on viper load/store.
agatti Feb 15, 2026
424ae08
py/asmrv32: Do not clobber index register on viper load/store.
agatti Feb 15, 2026
43a4914
tests/micropython: Add a test for checking viper value clobbering.
agatti Feb 15, 2026
b006bb0
extmod/vfs_reader: Process pending events during file reads.
iabdalkader Feb 17, 2026
fdb7c0f
docs/develop/writingtests: Document parameters of run_test.py.
Josverl Oct 9, 2025
2e62b56
ports: Refactor os.urandom().
robert-hh Feb 17, 2026
6b8bcb6
extmod/modos: Raise an error at a negative argument of os.urandom().
robert-hh Feb 22, 2026
6dbabc9
tests/extmod/os_urandom.py: Add test for os.urandom.
dpgeorge Feb 23, 2026
2050055
tests/micropython: Add a test for throwing incomplete exception.
jepler Oct 14, 2025
aaa30ab
py/objtype: Expose mp_native_base_init_wrapper_obj.
jepler Oct 14, 2025
c199ba9
py/objexcept: Check for incompletely constructed exceptions.
jepler Oct 14, 2025
2631b06
tests/cpydiff: Add a section for throwing incomplete exceptions.
jepler Oct 16, 2025
412ffd4
tools/codeformat.py: Use input files when formatting python code.
stinos Feb 11, 2026
2ab88c3
tests/run-tests.py: Add an argument for showing which tests would run.
stinos Feb 9, 2026
ff4d4bf
tests/run-tests.py: Make skip logic work irregardless of test path.
stinos Feb 9, 2026
b8098df
tests/run-tests.py: Use normal discovery if tests dir passed explicitly.
stinos Feb 9, 2026
7b91633
tests/cmdline: Make tests succeed irregardless of invocation path.
stinos Feb 11, 2026
e08e3d7
tests/run-tests.py: Output consistent test file paths.
stinos Feb 11, 2026
0dac591
tests/run-multitests.py: Improve error handling for communication error.
projectgus Feb 5, 2026
104deaa
zephyr: Use nodelabel when printing device name.
maass-hamburg Jan 13, 2026
30cc160
zephyr: Fix macro for getting erase_block_size.
ant9000 Feb 11, 2026
ab86f75
github/workflows: Bump actions/upload-artifact from 6 to 7.
dependabot[bot] Feb 26, 2026
947d04e
github: Add a Generative AI Usage declaration to the PR template.
projectgus Feb 19, 2026
e8304ee
samd/boards: Add more flash choices for Adafruit M4 boards.
robert-hh Feb 24, 2026
f013735
tests/net_inet: Use the letsencrypt TLS root cert for all tests.
projectgus Feb 26, 2026
8a1f050
tests/run-internalbench.py: Add option for running against CPython.
AJMansfield Sep 11, 2025
1bbce9c
extmod/mbedtls: Factor out mbedtls_hardware_poll() to common code.
robert-hh Feb 26, 2026
d4b5eb8
lib/alif_ensemble-cmsis-dfp: Update to v1.3.4.
dpgeorge Jan 25, 2026
45556c4
alif: Fix ALIF_TOOLS to use $(TOP) and remove unused ALIF_CONFIG.
dpgeorge Jan 25, 2026
6d9d880
alif/modmachine: Disable IRQs before going to sleep.
dpgeorge Jan 25, 2026
3b92139
alif/ospi_flash: Add ospi_flash_sleep helper function.
dpgeorge Jan 25, 2026
414fcbf
alif/boards/OPENMV_AE3: Save power upon deepsleep.
dpgeorge Jan 25, 2026
aac4653
alif/boards/OPENMV_AE3: Allow user button to wake from sleep.
dpgeorge Jan 25, 2026
58d2610
alif/boards/ALIF_ENSEMBLE: Add all SW1 pins and enable pull-ups on them.
dpgeorge Jan 25, 2026
04bf835
alif/boards/ALIF_ENSEMBLE: Add an off-profile.
dpgeorge Feb 26, 2026
4191cec
alif/machine_rtc: Factor out RTC helper functions.
dpgeorge Feb 4, 2026
1a01f76
alif/modmachine: Implement timeout_ms argument to deepsleep.
dpgeorge Feb 4, 2026
bebb404
alif/boards/OPENMV_AE3: Configure sensor interrupts as GPIO input.
dpgeorge Feb 25, 2026
63e4529
alif/machine_pwm: Implement machine.PWM.
dpgeorge Feb 7, 2026
95b3e72
tests/extmod_hardware/machine_pwm.py: Add alif pin config.
dpgeorge Feb 10, 2026
bfc69db
extmod,rp2: Keep LWIP timer running if lwip poll_sockets() is called.
projectgus Feb 11, 2026
716aae8
tests/basics/builtin_str_hex.py: Remove corresponding .exp file.
dpgeorge Feb 12, 2026
65ddc23
py/objstr: Factor code with a helper function to create empty str/bytes.
dpgeorge Feb 12, 2026
06bfefe
py/objstr: Fix b"".hex() so it returns an empty str object.
dpgeorge Feb 12, 2026
c3ca843
rp2/modules/rp2.py: Don't corrupt globals on asm_pio() exception.
arachsys Oct 19, 2025
61bbd78
mimxrt: Implement Quadrature Encoder and Counter classes.
robert-hh Sep 24, 2021
b1aba22
mimxrt/boards/make-pins.py: Add the XBAR tag to the AF names.
robert-hh Jan 8, 2026
655dc9f
docs: Add documentation for the mimxrt Encoder/Counter class.
robert-hh Apr 19, 2022
b64f4f9
tests/extmod_hardware/machine_encoder.py: Add a MIMXRT configuration.
robert-hh Aug 5, 2025
43d38d9
tests/extmod_hardware/machine_encoder.py: Separate the connection test.
dpgeorge Jan 2, 2026
2322d37
tests/extmod_hardware/machine_counter.py: Separate the connection test.
dpgeorge Jan 2, 2026
550b68f
mimxrt/boards: Add missing declarations of XBARA1 for two boards.
robert-hh Mar 9, 2026
6820e22
mimxrt/boards/ADAFRUIT_METRO_M7: Remove unused WiFi/BLE declarations.
robert-hh Mar 9, 2026
41d49b6
mimxrt/machine_encoder: Remove executable mode bit.
dpgeorge Mar 9, 2026
b343a36
ports: Don't pass -nostdlib in CFLAGS.
projectgus Mar 3, 2026
58436b2
py/lexer: Fix parsing of f'{{'.
dpgeorge Mar 4, 2026
d4751a1
py: Add support for PEP 750's t-strings.
dpgeorge Jan 6, 2026
a989585
mpy-cross: Enable t-strings.
dpgeorge Jan 6, 2026
bdef10a
tests: Add full feature and coverage tests for PEP 750 template strings.
koxudaxi Nov 10, 2025
68c2d4e
docs/library: Document string.templatelib module.
koxudaxi Nov 10, 2025
10af0a2
rp2/boards/CYTRON_NANOXRP_CONTROLLER: Add support for NanoXRP board.
SaintSampo Dec 24, 2025
3a24bdb
rp2/boards/CYTRON_MOTION_2350_PRO: Add Cytron Motion 2350 Pro board.
sync-on-luma Feb 20, 2026
20ffe6f
rp2/boards/WAVESHARE_RP2350B_CORE: Add Waveshare RP2350B Core board.
bikeNomad Dec 26, 2025
1968b96
rp2/boards/WAVESHARE_RP2040_LCD_0_96: Add Waveshare RP2040 LCD 0.96.
EngineerWill Oct 26, 2023
8cbd320
rp2/boards/WAVESHARE_RP2040_PLUS: Add Waveshare RP2040 Plus 4M and 16M.
EngineerWill Oct 26, 2023
ad054fc
rp2/boards/WAVESHARE_RP2040_ZERO: Add Waveshare RP2040 Zero board.
EngineerWill Oct 26, 2023
4319927
tests/run-tests.py: Ignore known-flaky test failures.
pi-anl Feb 25, 2026
fc5195b
README: Remove warning about the project being in beta stage.
dpgeorge Oct 2, 2025
4625f97
README: Add a section describing MicroPython's values.
dpgeorge Oct 2, 2025
e4920d6
docs/esp32: Replace 'esptool.py' by 'esptool' in command line example.
europrimus Jan 30, 2026
df9b714
docs/library/re: Document non-capturing grouping.
agatti Mar 12, 2026
06dbc1f
github: Revert "Run esp32&zephyr daily to keep mstr branch caches hot".
projectgus Mar 12, 2026
d2cda57
rp2/rp2_dma: Disable DMA IRQ before clearing handler function.
projectgus Mar 11, 2026
82c6b0e
esp32: Only check the lockfile currently used by the build.
projectgus Mar 12, 2026
fe32e1d
esp32: Drop support for ESP-IDF <v5.3.
projectgus Mar 12, 2026
f625d2e
esp32: Fix build for ESP-IDF version 5.3.
projectgus Mar 12, 2026
bac45e5
tests/ports/stm32/can: Update pyb.CAN tests for FDCAN.
projectgus Mar 17, 2026
4b339ee
stm32/pyb_can: Fix initialising CAN2 clearing CAN1 filters.
projectgus Mar 18, 2026
a906cfb
stm32/can: Clarify can_clearfilter() arguments.
projectgus Mar 18, 2026
d1c936d
stm32: Expose FDCAN2 on board NUCLEO_G474RE.
projectgus Mar 18, 2026
cda49be
py/objlist,stm32,esp32: Add helpers for creating/ensuring list args.
projectgus Dec 16, 2025
6768325
stm32: Add can_get_state() function, use from pyb.CAN.
projectgus Jan 29, 2026
0225704
extmod,docs: Add generic machine.CAN helpers & docs.
projectgus Dec 15, 2025
6f835b3
stm32: Implement index-aware STM32G4 FDCAN HAL TX functions.
projectgus Feb 18, 2026
6cac2d2
stm32: Add machine.CAN implementation.
projectgus Dec 15, 2025
c802a13
stm32: Fix printing value of pyb.CAN auto_restart on FDCAN hardware.
projectgus Mar 19, 2026
e74f3d5
stm32/timer: Use HAL macro to determine if TIM is 32-bit.
dpgeorge Mar 2, 2026
2d3241f
stm32/timer: Expose functions to convert id to reg and enable TIM clock.
dpgeorge Mar 2, 2026
dbe6a11
stm32/machine_pwm: Implement machine.PWM class.
dpgeorge Feb 11, 2026
094c268
stm32/machine_pwm: Use heuristic to assign TIMx_CHy to a pin.
dpgeorge Mar 5, 2026
6e9d35b
tests/extmod_hardware/machine_pwm.py: Round expected timing calculation.
dpgeorge Mar 2, 2026
142f8b9
tests/extmod_hardware/machine_pwm.py: Add pin settings for stm32 port.
dpgeorge Mar 2, 2026
1d5073f
extmod/machine_pwm: Fix use of object when pointer is needed.
dpgeorge Mar 2, 2026
af31472
stm32/boards: Disable some features on boards with small flash.
dpgeorge Mar 4, 2026
2b64d6d
stm32/boards/stm32f091_af.csv: Split TIM2_CH1 from TIM2_ETR.
dpgeorge Mar 6, 2026
98ab12a
stm32/boards/stm32n657_af.csv: Add TIM alt funcs to PA0-PA3.
dpgeorge Mar 6, 2026
ef2b30b
docs/library/machine.PWM: Add alif,stm32 to list of ports with invert.
dpgeorge Mar 5, 2026
47871a4
docs/library/machine.PWM: Document hardware PWM layout.
dpgeorge Mar 6, 2026
8f24c86
tests/extmod_hardware/machine_pwm.py: Convert test to use target_wiring.
dpgeorge Mar 18, 2026
2ccf78a
ci,esp32: Build oldest & newest ESP-IDF versions in CI.
projectgus Mar 12, 2026
e0beace
LICENSE,docs: Update copyright year range to include 2026.
dpgeorge Mar 11, 2026
b1d635f
docs/reference/speed_python: Update native emitter limitations.
agatti Mar 17, 2026
b3d88cf
extmod/nimble/modbluetooth_nimble: Handle port init failures.
agatti Mar 18, 2026
406356e
extmod/modlwip: Ensure socket is finalisable if error during creation.
dpgeorge Feb 7, 2026
8a3c9f0
extmod/modlwip: Call user callback on newly-received UDP or RAW packet.
jwhitham Jan 8, 2026
134bf4d
alif/irq: Add missing IRQ priorities.
iabdalkader Mar 18, 2026
82e44e0
stm32/mpthreadport: Increase minimum thread stack size to 2.5k.
dpgeorge Feb 9, 2026
702f15a
stm32/boards/PYBD_SF2: Free up some space in internal flash.
dpgeorge Mar 21, 2026
803a4d7
py/objtemplate: Correctly cast qstr literals when printing.
jepler Mar 13, 2026
74e9457
py/modweakref: Implement weakref module with ref and finalize classes.
dpgeorge Feb 4, 2026
c91d09a
tests/basics: Add tests for weakref.ref and weakref.finalize.
dpgeorge Feb 12, 2026
2cca348
tests/basics: Add test for weakref having exception in callback.
dpgeorge Feb 16, 2026
f83f363
webassembly/Makefile: Add test//% target.
dpgeorge Feb 15, 2026
6f96d26
webassembly/variants/pyscript: Enable weakref module and add tests.
dpgeorge Feb 15, 2026
44d8f70
docs/library/weakref: Add documentation for weakref module.
dpgeorge Feb 16, 2026
5c00edc
tools/ci.sh: Increase qemu_arm test run timeout.
dpgeorge Feb 16, 2026
85e8f61
lib/micropython-lib: Update submodule to latest.
dpgeorge Mar 24, 2026
bce8549
tests/feature_check/tstring.py: Remove check for string.templatelib.
dpgeorge Mar 24, 2026
93201ff
lib/cyw43-driver: Update driver to latest version v1.1.1.
dpgeorge Mar 24, 2026
ac48088
rp2/boards/SEEED_XIAO_RP2040: Add XIAO RP2040 board definition.
mattytrentini May 1, 2024
f4d2447
esp32/boards/SPARKFUN_THINGPLUS_ESP32C5: Add SF Thing Plus ESP32-C5.
sfe-SparkFro Mar 16, 2026
2dc2e30
esp32/boards/SEEED_XIAO_ESP32C6: Add new XIAO board definition.
pi-mst Mar 20, 2026
d41b8dc
py/emitglue: Fix macro logic that selects cache flushing code.
dpgeorge Mar 30, 2026
e8a3ee0
esp32/esp32_common.cmake: Add missing C flags to user C module sources.
dpgeorge Mar 3, 2026
e0e9fbb
all: Bump version to 1.28.0.
dpgeorge Apr 6, 2026
a4275e2
Add an asan native_sim build
tannewt Sep 1, 2026
22759ff
Merge branch 'main' into zephyr_native_sim_asan
dhalbert Sep 6, 2026
a539065
ci: run the Zephyr tests only when a change can reach them
lynt-smitka Sep 7, 2026
117fa80
wifi: scan 5GHz channels on dual-band radios
mikeysklar Sep 2, 2026
8f8697e
wifi: let connect() take a scan result
mikeysklar Sep 5, 2026
200cd3a
supervisor/web_workflow: keep serving after a watchdog reset (#10054)
grgrant Sep 8, 2026
bf73aaf
unix: fix the coverage build on arm64
4RH1T3CT0R7 Sep 8, 2026
d07fa9d
py/persistentcode: Detect the target architecture from compiler defines.
agatti Dec 19, 2025
09c7e02
py/persistentcode: Decouple native code loading from emitters' presence.
agatti Dec 20, 2025
4da9e5a
py/emitglue: Flush caches when loading native code without emitters.
agatti Dec 20, 2025
c033932
mpy-cross/mpconfigport: Explicitly disable native code loading.
agatti Dec 22, 2025
c3ecca3
py/emitglue: test the compiler target for the loader-only cache flush
mikeysklar Sep 7, 2026
e446f54
py: add CIRCUITPY_LOAD_NATIVE to load native .mpy without the emitter
mikeysklar Sep 7, 2026
cee7c17
boards: load native .mpy on five ARM boards
mikeysklar Sep 7, 2026
ae50cb8
ports/unix/Makefile: add CIRCUITPY-CHANGE
dhalbert Sep 8, 2026
56e13d3
Merge pull request #11327 from MakerClassCZ/ci-zephyr-tests-gate
tannewt Sep 9, 2026
de15916
Merge pull request #11330 from 4RH1T3CT0R7/fix/unix-port-arm64-build
tannewt Sep 9, 2026
e77d79e
BLE workflow: add a guard service after the workflow services
dhalbert Sep 9, 2026
9749ce1
Merge pull request #11308 from mikeysklar/esp32c5-wifi-5ghz
tannewt Sep 9, 2026
fababfa
Fix build on older compilers
tannewt Sep 9, 2026
0229af8
Merge remote-tracking branch 'adafruit/main' into zephyr_native_sim_asan
tannewt Sep 9, 2026
e2588d1
Merge MicroPython v1.28.0
mikeysklar Sep 9, 2026
184726c
ports/unix: take upstream v1.28 changes to the unix port
mikeysklar Sep 9, 2026
6877260
tests: skip string_tstring_basic1.py, it asserts upstream Unicode repr
mikeysklar Sep 9, 2026
fd40abc
Merge pull request #11317 from tannewt/zephyr_native_sim_asan
dhalbert Sep 9, 2026
d01486b
locale: regenerate circuitpython.pot for the v1.28.0 merge
mikeysklar Sep 10, 2026
0dd9201
py, tests: trim comments to what the code does not already say
mikeysklar Sep 10, 2026
ae2ec71
ports/unix/modtime: take upstream's move of mp_handle_pending in time…
mikeysklar Sep 10, 2026
f7b77e5
tests/run-tests: fix two typos codespell flags
mikeysklar Sep 10, 2026
5235eb5
wifi: make the scan result a network= kwarg
mikeysklar Sep 10, 2026
9c8995e
zephyr-cp/nrf7002dk: give slot0 the unused 32 KB storage partition
mikeysklar Sep 10, 2026
568bfb7
zephyr-cp/nrf7002dk: turn msgpack off to fit v1.28.0
mikeysklar Sep 10, 2026
40a6450
zephyr-cp/nrf7002dk: turn settings off with storage_partition gone
mikeysklar Sep 10, 2026
030de5b
build_memory_info: measure the hex when the image spans past the region
lynt-smitka Sep 10, 2026
9d7da18
build_release_files: don't build every language for a simulator
lynt-smitka Sep 10, 2026
2097c90
py/obj.h: drop the compatibility shim, change the consumers instead
mikeysklar Sep 10, 2026
2686e0e
py: remove two comments that only narrated upstream's v1.28 changes
mikeysklar Sep 10, 2026
a156588
Merge pull request #11335 from mikeysklar/nrf7002dk-reclaim-storage
tannewt Sep 10, 2026
2a7b3c4
build_memory_info: unpack the RAM region too
lynt-smitka Sep 10, 2026
2ab1134
Merge remote-tracking branch 'origin/main' into fix-sparse-image
lynt-smitka Sep 10, 2026
6d92b03
Merge branch 'main' into backport-load-native
tannewt Sep 10, 2026
fce40fb
Merge pull request #11331 from mikeysklar/backport-load-native
tannewt Sep 10, 2026
a10722a
Merge remote-tracking branch 'origin/main' into pr1b-on-main
mikeysklar Sep 10, 2026
95cd59c
Merge remote-tracking branch 'origin/main' into esp32c5-wifi-band
mikeysklar Sep 10, 2026
222dc38
wifi: drop the connect() network gate
mikeysklar Sep 10, 2026
128b34c
Tear down the guard service in supervisor_stop_bluetooth()
dhalbert Sep 10, 2026
bef01b5
Merge pull request #11337 from grgrant/fix/ww-watchdog
tannewt Sep 10, 2026
c538c87
Merge pull request #11336 from MakerClassCZ/fix-sparse-image
tannewt Sep 10, 2026
0da55e8
raspberrypi: load native .mpy on all RP2 boards
mikeysklar Sep 10, 2026
8b85925
raspberrypi: leave the loader off on four Pimoroni WiFi boards
mikeysklar Sep 10, 2026
514b1f9
Merge remote-tracking branch 'origin/main' into load-native-plumbing
mikeysklar Sep 10, 2026
0518c5b
raspberrypi: re-enable the loader on four Pimoroni WiFi boards
mikeysklar Sep 10, 2026
83a148f
Merge pull request #11333 from dhalbert/ble-guard-service
dhalbert Sep 10, 2026
eb49ac4
Merge pull request #11332 from mikeysklar/load-native-plumbing
ladyada Sep 11, 2026
0cfd87f
ci: get ninja from the IDF tools instead of apt
lynt-smitka Sep 11, 2026
be5162d
ci: bump the IDF tools cache key so it is rebuilt with ninja in it
lynt-smitka Sep 11, 2026
5001e41
ci_fetch_deps: mimxrt10xx needs lib/mp3
lynt-smitka Sep 11, 2026
d36f869
Merge pull request #11343 from MakerClassCZ/ci-espressif-ninja
dhalbert Sep 11, 2026
5f7773a
ci: run the Zephyr tests as three jobs, one per board family
lynt-smitka Sep 11, 2026
4c5a9f7
docs: drop weakref from the library docs
mikeysklar Sep 11, 2026
59478bc
docs: drop the templatelib availability note
mikeysklar Sep 11, 2026
00c8355
Merge adafruit/main into micropython-v1.28-mergecommit
mikeysklar Sep 11, 2026
af9e049
Revert "zephyr-cp/nrf7002dk: turn msgpack off to fit v1.28.0"
mikeysklar Sep 11, 2026
9c1110d
py/emitglue: drop a comment that only narrated the upstream v1.28 change
mikeysklar Sep 11, 2026
b734073
Merge pull request #11346 from MakerClassCZ/ci-fetch-deps-mimxrt-mp3
tannewt Sep 11, 2026
c9dee12
Merge pull request #11350 from MakerClassCZ/ci-zephyr-tests-shards
dhalbert Sep 11, 2026
f238641
Merge pull request #11334 from mikeysklar/micropython-v1.28-mergecommit
dhalbert Sep 11, 2026
8db7216
Merge pull request #11309 from mikeysklar/esp32c5-wifi-band
tannewt Sep 11, 2026
58e036f
espressif: keep IDF heap headroom while wifi/BLE are enabled
tyeth Aug 26, 2026
e4ec899
ssl: issue TLS session tickets for server-side sockets
tyeth Aug 26, 2026
891e719
debug: wifi softAP/DHCP/ESP-NOW event logging + EXTRA_SDKCONFIG hook …
tyeth Aug 26, 2026
041f7f8
debug: log IDF heap state on esp_now_send failure
tyeth Aug 26, 2026
c3743d0
debug: log IDF heap on every esp_now_send and AP station connect; opt…
tyeth Aug 26, 2026
cfd796f
debug: opt-console sdkconfig: TLS server buffers (in 4K/out 4K), dyna…
tyeth Aug 26, 2026
f5cccc2
debug: opt-console sdkconfig: hardware SHA/AES acceleration
tyeth Sep 11, 2026
c5706df
debug: bench console UART, esp_wifi_init heap logging, panic print+halt
tyeth Sep 11, 2026
d802e5f
espressif: 40KB radio heap reserve on the Feather/Metro/QT Py boards …
tyeth Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/actions/deps/external/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,11 @@ runs:
release: '15.2.Rel1'

# espressif
- name: Get espressif toolchain
if: inputs.port == 'espressif'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
shell: bash
- name: Install IDF tools
if: inputs.port == 'espressif'
run: |
$IDF_PATH/install.sh
$IDF_PATH/tools/idf_tools.py install ninja
rm -rf $IDF_TOOLS_PATH/dist
shell: bash
- name: Set environment
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deps/ports/espressif/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
uses: actions/cache@v5
with:
path: ${{ env.IDF_TOOLS_PATH }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-tools-idf-${{ steps.idf-commit.outputs.commit }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-tools-idf-${{ steps.idf-commit.outputs.commit }}-20260911

- name: Initialize IDF submodules
run: git submodule update --init --depth=1 --recursive $IDF_PATH
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
runs-on: ubuntu-24.04
outputs:
docs: ${{ steps.set-matrix.outputs.docs }}
zephyr-tests: ${{ steps.set-matrix.outputs.zephyr-tests }}
ports: ${{ steps.set-matrix.outputs.ports }}
cp-version: ${{ steps.set-up-submodules.outputs.version }}
steps:
Expand Down Expand Up @@ -102,6 +103,7 @@ jobs:

zephyr-tests:
needs: scheduler
if: needs.scheduler.outputs.zephyr-tests == 'True'
uses: ./.github/workflows/run-zephyr-tests.yml
with:
cp-version: ${{ needs.scheduler.outputs.cp-version }}
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/run-zephyr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ on:
jobs:
zephyr:
runs-on: ubuntu-24.04
name: ${{ matrix.shard }}
strategy:
fail-fast: false
# One job per board family, so the bsim suites, which take the longest, run
# side by side instead of after each other.
matrix:
include:
- shard: native_sim
boards: native_native_sim native_native_sim_asan
pytest_args: tests/ --ignore=tests/bsim
- shard: nrf5340bsim
boards: native_nrf5340bsim
pytest_args: tests/bsim -k native_nrf5340bsim
- shard: nrf54lm20bsim
boards: native_nrf54lm20bsim
pytest_args: tests/bsim -k native_nrf54lm20bsim
env:
CP_VERSION: ${{ inputs.cp-version }}
steps:
Expand All @@ -36,14 +50,9 @@ jobs:
target: zephyr-cp
- name: Set up external
uses: ./.github/actions/deps/external
- name: Build native sim target
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_native_sim
- name: Build bsim
if: contains(matrix.shard, 'bsim')
run: make -j $(nproc) everything
working-directory: ports/zephyr-cp/tools/bsim
- name: Build native_nrf5340bsim
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_nrf5340bsim
- name: Build native_nrf54lm20bsim
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_nrf54lm20bsim
- name: Run Zephyr tests
run: make -C ports/zephyr-cp test
run: make -C ports/zephyr-cp test TEST_BOARDS="${{ matrix.boards }}" PYTEST_ARGS="${{ matrix.pytest_args }}"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2025 Damien P. George
Copyright (c) 2013-2026 Damien P. George

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def autoapi_prepare_jinja_env(jinja_env):
"docs/README.md",
"AGENTS.md",
"**/AGENTS.md",
"docs/library/weakref.rst",
]

# The reST default role (used for this markup: `text`) to use for all
Expand Down
1 change: 1 addition & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ These libraries are not currently enabled in any CircuitPython build, but may be
platform.rst
re.rst
select.rst
string.templatelib.rst
sys.rst

Omitted ``string`` functions
Expand Down
5 changes: 4 additions & 1 deletion docs/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ Supported operators and special sequences are:
Grouping. Each group is capturing (a substring it captures can be accessed
with `match.group()` method).

``(?:...)``
Non-capturing grouping. Each group is matched using the same rules as
regular grouping, but will not be part of the match object.

``\d``
Matches digit. Equivalent to ``[0-9]``.

Expand Down Expand Up @@ -87,7 +91,6 @@ Supported operators and special sequences are:

* counted repetitions (``{m,n}``)
* named groups (``(?P<name>...)``)
* non-capturing groups (``(?:...)``)
* more advanced assertions (``\b``, ``\B``)
* special character escapes like ``\r``, ``\n`` - use Python's own escaping
instead
Expand Down
6 changes: 6 additions & 0 deletions docs/library/select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ Methods

In case of timeout, an empty list is returned.

Calling ``poll.poll`` is guaranteed to call pending callback functions
before entering the polling loop.

.. admonition:: Difference to CPython
:class: attention

Expand All @@ -93,6 +96,9 @@ Methods
won't be processed until new mask is set with `poll.modify()`. This
behaviour is useful for asynchronous I/O schedulers.

Calling ``poll.ipoll`` is guaranteed to call pending callback functions
before entering the polling loop.

.. admonition:: Difference to CPython
:class: attention

Expand Down
225 changes: 225 additions & 0 deletions docs/library/string.templatelib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
:mod:`string.templatelib` -- Template String Support
====================================================

.. module:: string.templatelib
:synopsis: PEP 750 template string support

This module provides support for template strings (t-strings) as defined in
`PEP 750 <https://peps.python.org/pep-0750/>`_. Template strings are created
using the ``t`` prefix and provide access to both the literal string parts and
interpolated values before they are combined.

Classes
-------

.. class:: Template(*args)

Represents a template string. Template objects are typically created by
t-string syntax (``t"..."``) but can also be constructed directly using
the constructor.

.. attribute:: strings

A tuple of string literals that appear between interpolations.

.. attribute:: interpolations

A tuple of :class:`Interpolation` objects representing the interpolated
expressions.

.. attribute:: values

A read-only property that returns a tuple containing the ``value``
attribute from each interpolation in the template.

.. method:: __iter__()

Iterate over the template contents, yielding string parts and
:class:`Interpolation` objects in the order they appear. Empty strings
are omitted.

.. method:: __add__(other)

Concatenate two templates. Returns a new :class:`Template` combining
the strings and interpolations from both templates.

:raises TypeError: if *other* is not a :class:`Template`

Template concatenation with ``str`` is prohibited to avoid ambiguity
about whether the string should be treated as a literal or interpolation::

t1 = t"Hello "
t2 = t"World"
result = t1 + t2 # Valid

# TypeError: cannot concatenate str to Template
result = t1 + "World"

.. class:: Interpolation(value, expression='', conversion=None, format_spec='')

Represents an interpolated expression within a template string. All
arguments can be passed as keyword arguments.

.. attribute:: value

The evaluated value of the interpolated expression.

.. attribute:: expression

The string representation of the expression as it appeared in the
template string.

.. attribute:: conversion

The conversion specifier (``'s'`` or ``'r'``) if present, otherwise ``None``.
Note that MicroPython does not support the ``'a'`` conversion.

.. attribute:: format_spec

The format specification string if present, otherwise an empty string.

Template String Syntax
----------------------

Template strings use the same syntax as f-strings but with a ``t`` prefix::

name = "World"
template = t"Hello {name}!"

# Access template components
print(template.strings) # ('Hello ', '!')
print(template.values) # ('World',)
print(template.interpolations[0].expression) # 'name'

Conversion Specifiers
~~~~~~~~~~~~~~~~~~~~~

Template strings store conversion specifiers as metadata. Unlike f-strings,
the conversion is not applied automatically::

value = "test"
t = t"{value!r}"
# t.interpolations[0].value == "test" (not repr(value))
# t.interpolations[0].conversion == "r"

Processing code must explicitly apply conversions when needed.

Format Specifications
~~~~~~~~~~~~~~~~~~~~~

Format specifications are stored as metadata in the ``Interpolation`` object.
Unlike f-strings, formatting is not applied automatically::

pi = 3.14159
t = t"{pi:.2f}"
# t.interpolations[0].value == 3.14159 (not formatted)
# t.interpolations[0].format_spec == ".2f"

Per PEP 750, processing code is not required to use format specifications, but
when present they should be respected and match f-string behavior where possible.

Debug Format
~~~~~~~~~~~~

The debug format ``{expr=}`` is supported::

x = 42
t = t"{x=}"
# t.strings == ("x=", "")
# t.interpolations[0].expression == "x"
# t.interpolations[0].conversion == "r"

.. admonition:: Important
:class: attention

As per PEP 750, unlike f-strings, template strings do not automatically
apply conversions or format specifications. This is by design to allow
processing code to control how these are handled. Processing code must
explicitly handle these attributes.

MicroPython does not provide the ``format()`` built-in function. Use
string formatting methods like ``str.format()`` instead.

Example Usage
-------------

Basic processing without format support::

def simple_process(template):
"""Simple template processing"""
parts = []
for item in template:
if isinstance(item, str):
parts.append(item)
else:
parts.append(str(item.value))
return "".join(parts)

Processing template with format support::

from string.templatelib import Template, Interpolation

def convert(value, conversion):
"""Apply conversion specifier to value"""
if conversion == "r":
return repr(value)
elif conversion == "s":
return str(value)
return value

def process_template(template):
"""Process template with conversion and format support"""
result = []
for part in template:
if isinstance(part, str):
result.append(part)
else: # Interpolation
value = convert(part.value, part.conversion)
if part.format_spec:
# Apply format specification using str.format
value = ("{:" + part.format_spec + "}").format(value)
else:
value = str(value)
result.append(value)
return "".join(result)

pi = 3.14159
name = "Alice"
t = t"{name!r}: {pi:.2f}"
print(process_template(t))
# Output: "'Alice': 3.14"

# Other format specifications work too
value = 42
print(process_template(t"{value:>10}")) # " 42"
print(process_template(t"{value:04d}")) # "0042"

HTML escaping example::

def html_escape(value):
"""Escape HTML special characters"""
if not isinstance(value, str):
value = str(value)
return value.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")

def safe_html(template):
"""Convert template to HTML-safe string"""
result = []
for part in template:
if isinstance(part, str):
result.append(part)
else:
result.append(html_escape(part.value))
return "".join(result)

user_input = "<script>alert('xss')</script>"
t = t"User said: {user_input}"
print(safe_html(t))
# Output: "User said: &lt;script&gt;alert('xss')&lt;/script&gt;"

See Also
--------

* `PEP 750 <https://peps.python.org/pep-0750/>`_ - Template Strings specification
* :ref:`python:formatstrings` - Format string syntax
* `Formatted string literals <https://docs.python.org/3/reference/lexical_analysis.html#f-strings>`_ - f-strings in Python
Loading
Loading