Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1360 commits
Select commit Hold shift + click to select a range
6b13e6c
stm32/boards/NUCLEO_H7x3: Fix st-flash and add openocd configuration.
oliver-joos Dec 14, 2025
230bbbb
stm32/boards/NUCLEO_H7x3: Add UART1, remove UART5, slow down PLL1Q.
oliver-joos Dec 18, 2025
e66a1a3
tests/basics/try_finally: Fix try/finally flow tests under CPython 3.14.
agatti Jan 12, 2026
eae83df
tests/float/math_fun: Fix domain error tests with CPython 3.14.
agatti Jan 15, 2026
b14d129
tests/float/complex1.py: Fix CPython 3.14 deprecation.
agatti Jan 15, 2026
f1363d8
github: Install Python 3.11 for Windows CI runs.
projectgus Jan 22, 2026
b792efc
tests/run-tests.py: Re-add stress_schedule.py for GitHub Actions.
jepler Nov 15, 2025
cfaba32
tests/thread/stress_schedule.py: Decrease backoff time.
jepler Nov 15, 2025
16ccf55
unix/modtime: Handle pending events during sleep(0).
jepler Nov 15, 2025
8e3ee30
unix/unix_mphal: Ensure mp_hal_delay_ms handles pending tasks.
jepler Nov 19, 2025
baf75e2
docs/library: Document that sleep(0)/sleep_ms(0) run the scheduler.
jepler Nov 28, 2025
8248d11
qemu/mphalport: Ensure mp_hal_delay_ms(0) handles pending tasks.
jepler Nov 28, 2025
2782d45
extmod/modselect: Handle pending events before entering poll.
jepler Nov 28, 2025
f387484
tests/micropython: Add new schedule_sleep.py test.
jepler Nov 28, 2025
78ec31b
tests/run-tests.py: Re-enable some asyncio tests for the native emitter.
jepler Dec 1, 2025
f918e33
tests/thread/stress_schedule.py: Remove decorator/inaccurate comment.
jepler Dec 1, 2025
894d7a5
extmod/modlwip: Fix latent bug with partially created socket object.
dpgeorge Aug 20, 2025
33474a6
extmod/modlwip: Adjust logic for determining a listening socket.
dpgeorge Aug 20, 2025
c696ca9
extmod/modlwip: Narrow error_lookup_table type to int8_t.
dpgeorge Dec 11, 2025
a7cd418
extmod/modlwip: Keep TCP data on remote RST.
dpgeorge Aug 19, 2025
25b400f
tests/multi_net/tcp_client_rst.py: Improve and extend test.
dpgeorge Dec 11, 2025
a5bda23
py/emitglue: Check for bytecode with MICROPY_PY_FUNCTION_ATTRS_CODE.
dpgeorge Jan 15, 2026
03f50d3
py/mpconfig: Enable MICROPY_PY_FUNCTION_ATTRS_CODE when marshal enabled.
dpgeorge Jan 15, 2026
384cc62
py/persistentcode: Support saving functions with children.
dpgeorge Jan 15, 2026
878f800
py/objfun: Support __code__ on functions with children.
dpgeorge Jan 15, 2026
93692ca
extmod/modmarshal: Support marshal.dumps of functions with children.
dpgeorge Jan 15, 2026
85e9d75
mimxrt/machine_adc: Initialize LPADC2 for rt117x.
alonbl Aug 9, 2025
2b07661
mimxrt/machine_adc: Support ADC channel groups on rt117x.
alonbl Aug 9, 2025
2a5a8cc
mimxrt/eth: Add DP83867 PHY driver support.
pi-anl Aug 14, 2025
5021137
mimxrt/boards/MIMXRT1170_EVK: Remove obsolete pin defines.
pi-anl Nov 11, 2025
77e62f6
mimxrt/eth: Improve Dual Ethernet configuration.
pi-anl Nov 20, 2025
af88d65
mimxrt: Add ALT11 pin mode support for MIMXRT1176.
APIUM Dec 8, 2025
1b2f6e3
mimxrt: Increase resolution of RTC to 1/32768 seconds.
dpgeorge Jan 15, 2026
be15be3
docs/mimxrt: Add docs for mimxrt.Flash.
pi-anl Nov 24, 2025
af76da9
stm32: Default to --connect-under-reset if flashing via deploy-stlink.
projectgus Dec 18, 2025
96bce47
tests: Factor out common helper functions to separate Python module.
dpgeorge Oct 21, 2025
0e3cc29
mimxrt: Add PSRAM implementation.
sfe-SparkFro Oct 16, 2025
b0feb9c
mimxrt/Makefile: Add CXXFLAGS, and libstdc++ to LDFLAGS.
sfe-SparkFro Oct 17, 2025
cf048e0
lib/nxp_driver: Update mimxrt SDK to MCUX_2.16.100.
pi-anl Apr 1, 2024
0e9e661
mimxrt/machine_uart: Use a wrapper function to handle IRQ idle support.
pi-anl Nov 14, 2024
1046b5d
mimxrt/Makefile: Make board linker scripts configurable.
sfe-SparkFro Jan 30, 2026
023a49c
mimxrt/boards/PHYBOARD_RT1170: Add PHYBOARD-RT1170 board support.
pi-anl Nov 11, 2025
1ecec98
lib/pico-sdk: Update pico-sdk to 2.2.0 release.
peterharperuk Nov 24, 2025
63dbaca
rp2: Add pico_platform_common to sdk components.
peterharperuk Nov 24, 2025
6ce0214
rp2: Remove build patch for Findpioasm.cmake.
peterharperuk Nov 24, 2025
2b4b05a
rp2: Fix linker scripts to match SDK 2.2.0.
peterharperuk Nov 24, 2025
e40d609
tests/multi_net: Skip all ssl/tls tests on axTLS.
dpgeorge Aug 4, 2025
edab53c
tests/multi_net: Use random.getrandbits instead of random.randrange.
dpgeorge Jan 13, 2026
e5f772a
tests/extmod/machine_spi_rate.py: Use target wiring for SPI instances.
dpgeorge Jan 21, 2026
d291a28
tests/target_wiring: Add SPI instance for mimxrt, nrf, renesas-ra, samd.
dpgeorge Jan 21, 2026
cef2538
tests/target_wiring/README: Add README describing target_wiring specs.
dpgeorge Jan 26, 2026
a1d4f62
tests/run-tests.py: Exit with error code 2 if test runner fails.
dpgeorge Feb 1, 2026
f624200
tests/test_utils.py: Abort test if serial port fails at start.
dpgeorge Feb 1, 2026
6436f8b
tests/run-tests.py: Abort test run if enter_raw_repl fails many times.
dpgeorge Feb 1, 2026
60c37a2
py/vstr: Make vstr_ins_byte/char functions inline to reduce code size.
dpgeorge Dec 19, 2025
5f59f39
py/vstr: Add vstr_ins_strn helper function.
dpgeorge Dec 18, 2025
bfb5e77
py/vstr: Don't check for byte_len>0 in vstr_ins_blank_bytes.
dpgeorge Jan 4, 2026
617c7db
py/lexer: Use null char as lexer EOF sentinel.
dpgeorge Dec 22, 2025
7ea88f7
py/lexer: Add support for nested f-strings within f-strings.
dpgeorge Dec 18, 2025
c9f747c
py/lexer: Move f-string completion code to more logical location.
dpgeorge Jan 6, 2026
570744d
py/runtime: Make import-all support non-modules via __dict__/__all__.
dpgeorge Jan 12, 2026
adbdded
ports: Remove incorrect and unnecessary mp_handle_pending declaration.
dpgeorge Jan 12, 2026
2984574
py/runtime: Reorder mp_handle_pending_behaviour_t enum.
dpgeorge Jan 12, 2026
7484598
py/runtime: Rename mp_handle_pending_internal to mp_handle_pending.
dpgeorge Jan 12, 2026
0c7726a
all: Use enum instead of bool argument to mp_handle_pending.
dpgeorge Jan 12, 2026
e07bad9
py/misc: Remove unused CHECKBUF macros.
dpgeorge Jan 13, 2026
cf90c8d
py/objmodule: Move decl of mp_obj_module_get_globals to objmodule.h.
dpgeorge Jan 13, 2026
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
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
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
568bfb7
zephyr-cp/nrf7002dk: turn msgpack off to fit v1.28.0
mikeysklar 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
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
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
2 changes: 2 additions & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ These libraries are not currently enabled in any CircuitPython build, but may be
platform.rst
re.rst
select.rst
string.templatelib.rst
sys.rst
weakref.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
230 changes: 230 additions & 0 deletions docs/library/string.templatelib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
: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.

**Availability:** template strings require ``MICROPY_PY_TSTRINGS`` to be enabled
at compile time. They are enabled by default at the full feature level, which
includes the alif, mimxrt and samd (SAMD51 only) ports, the unix coverage variant
and the webassembly pyscript variant.
Comment on lines +12 to +15

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment about availability is MicroPython-specific.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and it may go further. MICROPY_PY_TSTRINGS is only enabled in mpy-cross, never in firmware, so no board can import this module. The merge also added this page to the docs/library/index.rst toctree. Should it be there at all, or would you rather I just rewrite the availability text?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to decide whether to add this new templates feature to most boards. What is the size growth when it's turned on?

The easy documentation fix is just to remove the Availability: paragraph. Users can always check circuitpython.org.


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
78 changes: 78 additions & 0 deletions docs/library/weakref.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
:mod:`weakref` -- Python object lifetime management
===================================================

.. module:: weakref
:synopsis: Create weak references to Python objects

|see_cpython_module| :mod:`python:weakref`.

This module allows creation of weak references to Python objects. A weak reference
is a non-traceable reference to a heap-allocated Python object, so the garbage
collector can still reclaim the object even though the weak reference refers to it.

Python callbacks can be registered to be called when an object is reclaimed by the
garbage collector. This provides a safe way to clean up when objects are no longer
needed.

**Availability:** the weakref module requires ``MICROPY_PY_WEAKREF`` to be enabled
at compile time. It is enabled on the unix coverage variant and the webassembly
pyscript variant.
Comment on lines +17 to +19

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MicroPython-specific.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. MICROPY_PY_WEAKREF defaults to ROM level EVERYTHING and no CircuitPython build sets that, so the module is not available anywhere. Same question as the templatelib page: drop it from the toctree, or keep it with CircuitPython availability text?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem that useful for us right now. Just remove it from the toctree.


ref objects
-----------

A ref object is the simplest way to make a weak reference.

.. class:: ref(object [, callback], /)

Return a weak reference to the given *object*.

If *callback* is given and is not ``None`` then, when *object* is reclaimed
by the garbage collector and if the weak reference object is still alive, the
*callback* will be called. The *callback* will be passed the weak reference
object as its single argument.

.. method:: ref.__call__()

Calling the weak reference object will return its referenced object if that
object is still alive. Otherwise ``None`` will be returned.

finalize objects
----------------

A finalize object is an extended version of a ref object that is more convenient to
use, and allows more control over the callback.

.. class:: finalize(object, callback, /, *args, **kwargs)

Return a weak reference to the given *object*. In contrast to *weakref.ref*
objects, finalize objects are held onto internally and will not be collected until
*object* is collected.

A finalize object starts off alive. It transitions to the dead state when the
finalize object is called, either explicitly or when *object* is collected. It also
transitions to dead if the `finalize.detach()` method is called.

When *object* is reclaimed by the garbage collector (or the finalize object is
explicitly called by user code) and the finalize object is still in the alive state,
the *callback* will be called. The *callback* will be passed arguments as:
``callback(*args, **kwargs)``.

.. method:: finalize.__call__()

If the finalize object is alive then it transitions to the dead state and returns
the value of ``callback(*args, **kwargs)``. Otherwise ``None`` will be returned.

.. method:: finalize.alive

Read-only boolean attribute that indicates if the finalizer is in the alive state.

.. method:: finalize.peek()

If the finalize object is alive then return ``(object, callback, args, kwargs)``.
Otherwise return ``None``.

.. method:: finalize.detach()

If the finalize object is alive then it transitions to the dead state and returns
``(object, callback, args, kwargs)``. Otherwise ``None`` will be returned.
15 changes: 15 additions & 0 deletions extmod/modos.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ static mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) {
static MP_DEFINE_CONST_FUN_OBJ_1(mp_os_dupterm_notify_obj, mp_os_dupterm_notify);
#endif

#if MICROPY_PY_OS_URANDOM
// This wraps the port-specific mp_hal_get_random(), which is usually defined in mphalport.c.
static mp_obj_t mp_os_urandom(mp_obj_t num) {
mp_int_t n = mp_obj_get_int(num);
if (n < 0) {
mp_raise_ValueError(NULL);
}
vstr_t vstr;
vstr_init_len(&vstr, n);
mp_hal_get_random(n, (uint8_t *)vstr.buf);
return mp_obj_new_bytes_from_vstr(&vstr);
}
static MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom);
#endif
Comment thread
dhalbert marked this conversation as resolved.

static const mp_rom_map_elem_t os_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) },

Expand Down
2 changes: 2 additions & 0 deletions extmod/modselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ static mp_uint_t poll_set_poll_until_ready_or_timeout(poll_set_t *poll_set, size
mp_uint_t start_ticks = mp_hal_ticks_ms();
bool has_timeout = timeout != (mp_uint_t)-1;

mp_handle_pending(true);

#if MICROPY_PY_SELECT_POSIX_OPTIMISATIONS

for (;;) {
Expand Down
Loading
Loading