Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in MicroPython v1.10 #4646

Merged
merged 598 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
598 commits
Select commit Hold shift + click to select a range
b01f66c
py: Shorten error messages by using contractions and some rewording.
dpgeorge Jun 20, 2018
2da5d41
py/objstr: Make % (__mod__) formatting operator configurable.
pfalcon Aug 15, 2018
93f2997
py/modbuiltins: Make oct/hex work when !MICROPY_PY_BUILTINS_STR_OP_MO…
pfalcon Sep 16, 2018
17f7c68
stm32: Add support for STM32F765xx MCUs.
pi-anl Sep 5, 2018
3f6ffe0
py/objgenerator: Implement PEP479, StopIteration convs to RuntimeError.
dpgeorge Sep 13, 2018
11573fc
unix/modjni: Update .getiter signature to include mp_obj_iter_buf_t* .
pfalcon Sep 8, 2018
6623d7a
unix/modjni: Get building under coverage and nanbox builds.
dpgeorge Sep 20, 2018
1628cd0
drivers/sdcard: In test use os.umount and machine module instead of pyb.
peterhinch Sep 16, 2018
927a5d1
docs/library/pyb: Add deprecation warning for mount and old block proto.
peterhinch Sep 16, 2018
57a7397
lib/libm_dbl: Add implementation of copysign() for DEBUG builds.
pi-anl Sep 17, 2018
56f275c
stm32/Makefile: Include copysign.c in double precision float builds.
dpgeorge Sep 20, 2018
40a7e8c
drivers/sdcard: Remove debugging print statement in ioctl method.
peterhinch Sep 18, 2018
ad4fb62
docs/pyboard: Fix to use Sphinx style for internal/external links.
dpgeorge Sep 20, 2018
1857165
esp32/machine_rtc: Fix locals dict entry, init qstr points to init meth.
dpgeorge Sep 20, 2018
b768cc6
py/parsenum: Avoid rounding errors with negative powers-of-10.
Ecco Sep 13, 2018
9849209
tests/float/float_parse.py: Add tests for accuracy of small decimals.
dpgeorge Sep 20, 2018
3220ced
stm32/adc: Fix ADC calibration scale for L4 MCUs, they use 3.0V.
dpgeorge Sep 20, 2018
cb3c66e
stm32/adc: Increase sample time for internal sensors on L4 MCUs.
dpgeorge Sep 20, 2018
a270364
tools/pydfu: Workaround stdio flush error on Windows with Python 3.6.
pi-anl Sep 12, 2018
84f4d58
stm32/dcmi: Add F4/F7/H7 hal files and dma definitions for DCMI periph.
pi-anl Sep 17, 2018
cdc0140
stm32/uart: Add support for USART3-8 on F0 MCUs.
dpgeorge Sep 21, 2018
4df1943
stm32/boards/NUCLEO_F091RC: Enable USART3-8 with default pins.
dpgeorge Sep 21, 2018
1acf58c
stm32/modmachine: Re-enable PLLSAI[1] after waking from stop mode.
dpgeorge Sep 24, 2018
dff14c7
stm32/powerctrl: Move function to set SYSCLK into new powerctrl file.
dpgeorge Sep 24, 2018
9e48127
stm32/powerctrl: Fix configuring APB1/APB2 frequency when AHB also set.
dpgeorge Sep 24, 2018
90ea2c6
stm32/powerctrl: Factor code to set RCC PLL and use it in startup.
dpgeorge Sep 24, 2018
dae1635
stm32/powerctrl: Factor code that configures PLLSAI on F7 MCUs.
dpgeorge Sep 24, 2018
bc54c57
stm32/powerctrl: Optimise passing of default values to set_sysclk.
dpgeorge Sep 24, 2018
6ea6c7c
stm32/powerctrl: Don't configure clocks if already at desired frequency.
dpgeorge Sep 24, 2018
5f92756
lib/stm32lib: Update library to fix issue with filling USB TX FIFO.
dpgeorge Sep 26, 2018
7b452e7
stm32/usbd_conf: Allocate enough space in USB HS TX FIFO for CDC packet.
dpgeorge Sep 26, 2018
8c65675
py/modmath: Add math.factorial, optimised and non-opt implementations.
swenson Aug 27, 2018
84090ed
stm32/mpconfigport.h: Enable math.factorial, optimised version.
dpgeorge Sep 26, 2018
af2030d
unix/mpconfigport.h: Enable MICROPY_PY_UHASHLIB_MD5 for uhashlib.md5.
pfalcon Aug 19, 2018
09c5c58
docs/library/machine.SPI: Add note about baudrate imprecision.
peterhinch Sep 20, 2018
a135bca
py/objstr: format: Return bytes result for bytes format string.
pfalcon Sep 21, 2018
8181ec0
tests/cpydiff: Add case for difference in behaviour of bytes.format().
pfalcon Sep 22, 2018
57a7d5b
py: Fix msvc C++ compiler warnings with MP_OBJ_FUN_MAKE_SIG macro.
stinos Sep 24, 2018
76355c8
py/vm: Make small optimisation of BUILD_SLICE opcode.
dpgeorge Sep 27, 2018
baa83a0
py/objslice: Remove long-obsolete comment about enhancing slice object.
dpgeorge Sep 27, 2018
814f17a
py/objdict: Reword TODO about inlining mp_obj_dict_get to a note.
dpgeorge Sep 27, 2018
cc5c3c6
py/objint: Remove TODO about checking of int() arg types with 2 args.
dpgeorge Sep 27, 2018
04f7da7
py/objmodule: Remove TODO about checking store attr to a module.
dpgeorge Sep 27, 2018
6d20be3
py/vm: Reword TODO about invalid ip/sp after an exception to a note.
dpgeorge Sep 27, 2018
fc1bb51
py/objgenerator: Remove TODO about returning gen being called again.
dpgeorge Sep 27, 2018
4c08932
lib/libm/math: Fix int type in float union, uint64_t should be uint32_t.
dpgeorge Sep 27, 2018
8960a28
lib/libm/math: Add implementation of __signbitf, if needed by a port.
dpgeorge Sep 27, 2018
b3eadf3
py/objfloat: Fix abs(-0.0) so it returns 0.0.
dpgeorge Sep 27, 2018
217566b
docs/library/network: Move specific network classes to their own file.
dpgeorge Sep 26, 2018
8a84e08
docs/library/network: Make AbstractNIC methods layout correctly.
dpgeorge Sep 26, 2018
7d4b6cc
py/emitnative: Place const objs for native code in separate const table.
dpgeorge Sep 27, 2018
2e86233
py/asm*: Remove ASM_MOV_REG_ALIGNED_IMM emit macro, it's no longer used.
dpgeorge Sep 27, 2018
ac81cee
tests/micropython: Test loading const objs in native and viper funcs.
dpgeorge Sep 27, 2018
bbccb0f
esp8266: Remove scanning of GC pointers in native code block.
dpgeorge Sep 27, 2018
e9012a2
py/emitnative: Change type of const_table from uintptr_t to mp_uint_t.
dpgeorge Sep 27, 2018
e6078df
tests/basics: Split out gen throw tests from yield-from-throw tests.
dpgeorge Sep 28, 2018
0c9d452
py/vm: Fix case of throwing GeneratorExit type into yield-from.
dpgeorge Sep 28, 2018
2c7a306
py/runtime: Remove nlr protection when calling __next__ in mp_resume.
dpgeorge Sep 28, 2018
2eb0170
py/objtype: Remove TODO about storing attributes to classes.
dpgeorge Sep 28, 2018
dd28890
py/objtype: Support full object model for get/set/delitem special meths.
dpgeorge Sep 28, 2018
d95947b
py/vm: When VM raises exception put exc obj at beginning of func state.
dpgeorge Sep 29, 2018
07ccb19
py/asmthumb: Add wide ldr to handle larger offsets.
dpgeorge Sep 30, 2018
ef9394e
py/asmthumb: Clean up asm_thumb_bl_ind to use new optimised ldr helper.
dpgeorge Sep 30, 2018
8723113
py/asmthumb: Extend asm entry/exit to handle stack larger than 508 bytes
dpgeorge Sep 30, 2018
1dc720d
py/asmx86: Comment out unused asm_x86_nop to prevent compiler warnings.
dpgeorge Oct 1, 2018
5b19916
py/asmx64: Extend asm_x64_mov_reg_pcrel to accept high registers.
dpgeorge Oct 1, 2018
4fc437f
py/asmxtensa: Use proper calculation for const table offset.
dpgeorge Oct 1, 2018
8fec6f5
py/emitnative: Reorder native state on C stack so nlr_buf_t is first.
dpgeorge Oct 1, 2018
cc2bd63
py/emitnative: Implement yield and yield-from in native emitter.
dpgeorge Oct 1, 2018
5cc9517
tests/run-tests: Enabled native tests that pass now that yield works.
dpgeorge Oct 1, 2018
b3e013f
docs: Unify all the ports into one set of documentation.
dpgeorge Sep 27, 2018
d1adfee
docs: Remove sphinx_selective_exclude, it's no longer used.
dpgeorge Sep 27, 2018
86819a5
docs/wipy: Fix links to network.Server, and markup for boot.py.
dpgeorge Oct 1, 2018
4ab3975
py/runtime: Use mp_import_name to implement tail of mp_import_from.
dpgeorge Oct 1, 2018
a9237ce
py/runtime: Remove comment in mp_import_name about level being 0.
dpgeorge Oct 1, 2018
69e7903
py/obj.h: Use uint64_t instead of mp_int_t in repr-D MP_OBJ_IS_x macros.
dpgeorge Oct 1, 2018
34af10d
py/emitnative: Clean up unused macro and forward function declarations.
dpgeorge Oct 2, 2018
cb66b75
tests/unix/ffi_float: Skip if strtof() is not available.
pfalcon Sep 10, 2018
b9bad7f
unix/moduselect: Raise OSError(ENOENT) if obj to modify is not in poller
pfalcon Sep 28, 2018
6ef7835
tests/uselect_poll_basic: Add basic test for uselect.poll invariants.
pfalcon Sep 28, 2018
d251f26
docs/uselect: Describe more aspects of poll.register/modify behavior.
pfalcon Sep 28, 2018
18f45d2
extmod/moductypes: Remove BITFIELD from aggregate types enum.
pfalcon Sep 29, 2018
397ee7c
windows/msvc: Fix incorrect indentation in dirent.c.
stinos Oct 4, 2018
02ca8d4
windows/msvc: Implement file/directory type query.
stinos Oct 4, 2018
338635c
stm32/main: Add configuration macros for board to set heap start/end.
andrewleech Oct 2, 2018
11bc38d
nrf/bluetooth: Set GAP_ADV_MAX_SIZE to 31 (s132/s140).
glennrub Sep 22, 2018
8941c63
py/asmx64: Change stack management to reference locals by rsp not rbp.
dpgeorge Oct 13, 2018
8e4b4ba
py/asmx64: Change indirect calls to load fun ptr from the native table.
dpgeorge Oct 13, 2018
b7c6f85
py/asmx86: Change stack management to reference locals by esp not ebp.
dpgeorge Oct 13, 2018
355eb8e
py/asmx86: Change indirect calls to load fun ptr from the native table.
dpgeorge Oct 13, 2018
0066710
py/emitnative: Load native fun table ptr from const table for all archs.
dpgeorge Oct 13, 2018
5f1dd5b
py/asmarm: Simplify asm_arm_bl_ind to only load via index, not literal.
dpgeorge Oct 13, 2018
2557180
py/asmthumb: Remove unused fun_ptr arg from asm_thumb_bl_ind function.
dpgeorge Oct 13, 2018
6bda951
py/emitnative: Remove unused ptr argument from ASM_CALL_IND macro.
dpgeorge Oct 13, 2018
9fbd12f
extmod/moductypes: Accept OrderedDict as a structure description.
pfalcon Aug 25, 2018
7059b4a
tests/uctypes_sizeof_od: Test for using OrderedDict as struct descriptor
pfalcon Aug 26, 2018
f5d46a8
lib/utils/pyexec: Forcefully unlock the heap if locked and REPL active.
dpgeorge Oct 13, 2018
7de9211
docs/machine.Pin: Add note regarding irq handler argument.
peterhinch Oct 8, 2018
759853f
docs/machine.Pin: Document "hard" argument of Pin.irq method.
peterhinch Oct 8, 2018
175739c
py/emitnative: Consolidate use of stacked immediate values to one func.
dpgeorge Oct 14, 2018
7c16bc0
py/emitnative: Simplify viper mode handling in emit_native_import_name.
dpgeorge Oct 14, 2018
6c6050c
py/emitnative: Push internal None rather than const obj where possible.
dpgeorge Oct 14, 2018
de71035
py/emitnative: Put None/False/True in global native const table.
dpgeorge Oct 14, 2018
53ccbe6
stm32/usbd_cdc_interface: Handle disconnect IRQ to set VCP disconnected.
dpgeorge Oct 15, 2018
0f6f86c
stm32/usbd_cdc_interface: Refactor USB CDC tx code to not use SOF IRQ.
dpgeorge Oct 15, 2018
80a2581
unix/modusocket: Initial implementation of socket.settimeout().
Sep 2, 2016
0c18633
unix/modusocket: Finish socket.settimeout() implementation.
pfalcon Oct 7, 2018
6c5b2bd
unix/modffi: Add support for "q"/"Q" specs (int64_t/uint64_t).
pfalcon Aug 29, 2018
f0db1a5
stm32/spi: Fix calculation of SPI clock source on H7 MCUs.
iabdalkader Oct 11, 2018
d2c5496
stm32/boards/stm32h743.ld: Fix total flash size, should be 2048k.
dpgeorge Oct 17, 2018
4904663
extmod/modonewire: Fix reset timings to match 1-wire specs.
dpgeorge Oct 17, 2018
7eb29c2
py/objtype: Remove comment about catching exc from user __getattr__.
dpgeorge Oct 18, 2018
a07e56c
tests/basics/class_getattr: Remove invalid test for __getattribute__.
dpgeorge Oct 18, 2018
5f7088f
docs/uio: Document StringIO/BytesIO(alloc_size) constructors.
pfalcon Sep 29, 2018
6ddcfe6
unix/Makefile: Allow to override/omit pthread lib name.
pfalcon Sep 8, 2018
5e5aef5
esp32/modesp32: Add hall_sensor() function.
MrSurly Oct 11, 2018
b031b6f
docs/pyb.Pin: Minor typo fix to specify Pin in pyb.Pin.cpu.
dhylands Oct 18, 2018
3c6f639
esp32/network_ppp: Add PPPoS functionality.
MrSurly May 16, 2018
7795b2e
tools/pyboard.py: In TelnetToSerial.close replace try/except with if.
dybber Oct 16, 2018
5a91fce
py/objstr: Make str.count() method configurable.
pfalcon Aug 5, 2018
a527313
tests: Make bytes/str.count() tests skippable.
pfalcon Aug 30, 2018
454cca6
py/objmodule: Implement PEP 562's __getattr__ for modules.
pmp-p Oct 22, 2018
2411f42
extmod/moductypes: Make sizeof() accept "layout" parameter.
pfalcon Aug 25, 2018
c638d86
tests/extmod/uctypes_sizeof_layout: Test for sizeof of different layout.
pfalcon Aug 26, 2018
dd76c8d
docs/library/uctypes: Add examples and make general updates.
pfalcon Oct 7, 2018
42d0a28
docs/conf.py: Use https for intersphinx link to docs.python.org.
pfalcon Oct 20, 2018
af5b509
examples/unix/ffi_example: Clean up and update the ffi example.
pfalcon Oct 20, 2018
27ca9ab
tests/import: Add .exp file for module_getattr.py to not require Py 3.7.
dpgeorge Oct 23, 2018
746dbf7
py/py.mk: When building axtls use -Wno-all to prevent all warnings.
dpgeorge Oct 23, 2018
c2074e7
tests/cmdline/cmd_showbc.py: Fix test to explicitly declare nonlocal.
dpgeorge Oct 26, 2018
9201f46
py/compile: Fix case of eager implicit conversion of local to nonlocal.
dpgeorge Oct 26, 2018
ba92c79
py/compile: Remove unneeded variable from global/nonlocal stmt helpers.
dpgeorge Oct 26, 2018
e328a5d
py/scope: Optimise scope_find_or_add_id to not need "added" arg.
dpgeorge Oct 27, 2018
06643a0
tests/extmod: Skip uselect test when CPython doesn't have poll().
stinos Oct 24, 2018
30ed2b3
stm32/system_stm32: Introduce configuration defines for PLL3 settings.
rolandvs Oct 24, 2018
5c18730
py/runtime: Fix qstr assumptions when handling "import *".
pfalcon Oct 25, 2018
d94aa57
tests/import_long_dyn: Test for "import *" of a long dynamic name.
pfalcon Oct 25, 2018
51482ba
README: Remove references to "make axtls", it's no longer needed.
dpgeorge Nov 15, 2018
d63ef86
README: Remove text about selecting different ports in the docs.
dpgeorge Nov 26, 2018
7c85c7c
py/unicode: Fix check for valid utf8 being stricter about contn chars.
dpgeorge Nov 26, 2018
9acc32b
stm32/adc: Add ADC auto-calibration for L4 MCUs.
Nov 16, 2018
fe452af
stm32/flashbdev: Add missing include for irq.h.
IAmCoder Nov 21, 2018
80aca27
unix/modos: Rename unlink to remove to be consistent with other ports.
pfalcon Nov 16, 2018
5c34c2f
tests/io: Update tests to use uos.remove() instead of uos.unlink().
pfalcon Nov 26, 2018
4f25a8b
tools/pydfu.py: Improve DFU reset, and auto-detect USB transfer size.
dpgeorge Nov 27, 2018
5f67b03
stm32/servo: Only initialise TIM5 if it is needed, to save power.
dpgeorge Nov 28, 2018
3a723ad
stm32/usb: Fully deinitialise USB periph when it is deactivated.
dpgeorge Nov 28, 2018
66ca8e9
stm32/powerctrl: Move (deep)sleep funcs from modmachine.c to powerctrl.c
dpgeorge Nov 28, 2018
afd1ce0
stm32/powerctrl: Disable IRQs during stop mode to allow reconfig on wake
dpgeorge Nov 28, 2018
0233049
esp32/mpthreadport: Prevent deadlocks when deleting all threads.
dpgeorge Nov 28, 2018
485514f
esp32: Allocate task TCB and stack from system heap not uPy heap.
dpgeorge Nov 28, 2018
9e2dd93
esp8266/ets_alt_task: Process idle callback if no other events occurred.
dpgeorge Nov 28, 2018
321d75e
esp8266/modnetwork: Automatically do radio sleep if no interface active.
dpgeorge Nov 28, 2018
4737ff8
extmod/modlwip: Implement TCP listen/accept backlog.
dpgeorge Nov 28, 2018
10bddc5
stm32/boards/STM32F429DISC: Enable UART as secondary REPL.
rolandvs Nov 28, 2018
29da9f0
extmod/modlwip: Fix read-polling of listening socket with a backlog.
dpgeorge Dec 3, 2018
7f948a5
py/py.mk: Fix broken Gmane URL.
cyounkins Nov 30, 2018
62b4beb
esp8266/modnetwork: Wait for iface to go down before forcing power mgmt.
dpgeorge Dec 3, 2018
31cf528
py: Add option to reduce GC stack integer size to save RAM.
aykevl Feb 23, 2018
da1d849
stm32,esp8266,cc3200: Use MICROPY_GC_STACK_ENTRY_TYPE to save some RAM.
dpgeorge Dec 4, 2018
9262f54
stm32/uart: Always show the flow setting when printing a UART object.
dpgeorge Dec 4, 2018
13e92e1
stm32/mboot: Provide led_state_all function to reduce code size.
dpgeorge Dec 4, 2018
eed522d
stm32/mboot: Add support for 4th board LED.
dpgeorge Dec 4, 2018
c040961
stm32/boards: Add configuration for putting mboot on PYBv1.x.
dpgeorge Dec 4, 2018
a1c8176
stm32/mboot: Add documentation for using mboot on PYBv1.x.
dpgeorge Dec 4, 2018
c6365ff
stm32/powerctrl: Add support for standby mode on L4 MCUs.
dpgeorge Dec 4, 2018
8007d0b
stm32/uart: Add rxbuf keyword arg to UART constructor and init method.
dpgeorge Dec 5, 2018
9ddc182
esp32/machine_uart: Add txbuf/rxbuf keyword args to UART construct/init.
dpgeorge Dec 5, 2018
52bec93
esp8266/machine_uart: Add rxbuf keyword arg to UART constructor/init.
dpgeorge Dec 5, 2018
1a8baad
stm32/boards: Add STM32L432KC chip configuration files.
boochow Dec 1, 2018
9d3372b
stm32: Add peripheral support for STM32L432.
boochow Dec 1, 2018
69b7b8f
stm32/boards: Add NUCLEO_L432KC board configuration files.
boochow Dec 1, 2018
8762308
esp32/machine_uart: Implement UART.sendbreak() method.
dpgeorge Dec 6, 2018
287b02d
esp32/machine_pwm: Support higher PWM freq by auto-scaling timer res.
dpgeorge Dec 6, 2018
9c6c32c
esp32/machine_pwm: On deinit stop routing PWM signal to the pin.
dpgeorge Dec 6, 2018
da7355e
esp32/modmachine: Enable machine.sleep() now that the IDF supports it.
dpgeorge Dec 6, 2018
113f00a
py/objboundmeth: Support loading generic attrs from the method.
dpgeorge Dec 6, 2018
b1d0872
py/obj: Add support for __int__ special method.
pfalcon Aug 29, 2018
d690c2e
tests/basics/special_methods: Add testcases for __int__.
pfalcon Aug 29, 2018
9d864bd
extmod/moductypes: Implement __int__ for PTR.
pfalcon Aug 29, 2018
0de6815
tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field.
pfalcon Aug 29, 2018
074597f
tests/extmod/uctypes_error: Add test for unsupported unary op.
dpgeorge Dec 10, 2018
38151f3
extmod/moductypes: Add aliases for native C types.
pfalcon Oct 6, 2018
bad4e15
py/objexcept: Use macros to make offsets in emergency exc buf clearer.
dpgeorge Dec 7, 2018
55830dd
py/objexcept: Make sure mp_obj_new_exception_msg doesn't copy/format msg
dpgeorge Dec 10, 2018
a227153
stm32: Split out UART Python bindings from uart.c to machine_uart.c.
dpgeorge Dec 7, 2018
524e13b
stm32/uart: Factor out code from machine_uart.c that computes baudrate.
dpgeorge Dec 9, 2018
9690757
stm32/uart: Rework uart_get_baudrate so it doesn't need a UART handle.
dpgeorge Dec 9, 2018
7d7f59d
stm32/uart: Factor out code to set RX buffer to function uart_set_rxbuf.
dpgeorge Dec 9, 2018
bc3f0dd
stm32/uart: Remove HAL's UART_HandleTypeDef from UART object struct.
dpgeorge Dec 9, 2018
e0c2432
stm32/uart: Simplify deinit of UART, no need to call HAL.
dpgeorge Dec 9, 2018
6ea4527
stm32/uart: For UART init, pass in params directly, not via HAL struct.
dpgeorge Dec 10, 2018
61ef031
stm32/uart: Move config of char_width/char_mask to uart.c.
dpgeorge Dec 10, 2018
dc23978
stm32/uart: Add ability to have a static built-in UART object.
dpgeorge Dec 10, 2018
025d419
teensy: Add own uart.h to not rely on stm32's version of the file.
dpgeorge Dec 10, 2018
beeeec2
docs/README: Remove references to MICROPY_PORT when building docs.
dpgeorge Dec 10, 2018
9e5768a
nrf/bluetooth: Update BLE stack download script.
glennrub Dec 2, 2018
1b4031e
stm32/extint: Use correct EXTI channels on H7 MCUs for RTC events.
dpgeorge Dec 12, 2018
0555ada
stm32/adc: Fix calibrated volt/temp readings on H7 by using 16bit scale.
dpgeorge Dec 12, 2018
6cab8da
stm32/adc: Increase ADC sampling time for internal sources on H7 MCUs.
dpgeorge Dec 12, 2018
1db5538
stm32/adc: Support 16-bit ADC configuration on H7 MCUs.
dpgeorge Dec 12, 2018
169b152
docs/ure: Fully describe supported syntax subset, add example.
pfalcon Oct 17, 2018
fbb8335
py/objdict: Make .fromkeys() method configurable.
pfalcon Aug 5, 2018
6bf8ecf
py/bc: Fix calculation of opcode size for opcodes with map caching.
dpgeorge Dec 10, 2018
814d580
tools/mpy-tool.py: Fix calc of opcode size for opcodes with map caching.
dpgeorge Dec 10, 2018
d4d4bc5
tests/basics/special_methods2: Typo fix in comment.
pfalcon Sep 17, 2017
59f409a
stm32/boards: Allow OpenOCD stm_flash procedure to accept single FW img.
dpgeorge Dec 13, 2018
5146e79
stm32/boards/NUCLEO_L432KC: Specify L4 OpenOCD config file for this MCU.
dpgeorge Dec 13, 2018
0c46419
windows: Remove remaining traces of old GNU readline support.
dpgeorge Dec 15, 2018
0d165fe
py/qstr: Put a lower bound on new qstr pool allocation.
dpgeorge Dec 13, 2018
39eef27
tools/mpy-tool.py: Fix build error when no qstrs present in frozen mpy.
dhylands Dec 11, 2018
a261d8b
py/objarray: Introduce "memview_offset" alias for "free" field of object
pfalcon Sep 16, 2018
5ed578e
py/gc: Adjust gc_alloc() signature to be able to accept multiple flags.
pfalcon Oct 26, 2018
ce0c581
stm32/main: Add board config option to enable/disable mounting SD card.
pi-anl Dec 2, 2018
7cd59c5
py/mpconfig: Move MICROPY_VERSION macros to static ones in mpconfig.h.
dpgeorge Dec 15, 2018
fa50047
py/runtime: Unlock the GIL in mp_deinit function.
dpgeorge Dec 27, 2018
06236bf
lib/utils: Add generic MicroPython IRQ helper functions.
tobbad Dec 9, 2018
372e7a4
stm32: Implement UART.irq() method with initial support for RX idle IRQ.
tobbad Dec 9, 2018
a5f7a30
stm32/uart: Fix uart_rx_any in case of no buffer to return 0 or 1.
dpgeorge Dec 29, 2018
0d860fd
stm32/uart: Always enable global UART IRQ handler on init.
dpgeorge Dec 29, 2018
7bdbea9
stm32/uart: Clear overrun error flag after reading RX data register.
dpgeorge Dec 29, 2018
f334816
stm32/uart: Make sure user IRQs are handled even with a keyboard intr.
dpgeorge Dec 29, 2018
4d85044
stm32/modmachine: Fix reset_cause to correctly give DEEPSLEEP on L4 MCU.
rolandvs Dec 27, 2018
c932639
tools/pydfu.py: Fix regression so tool runs under Python 2 again.
dhylands Dec 28, 2018
b33f108
stm32/sdcard: Properly reset SD periph when SDMMC2 is used on H7 MCUs.
dpgeorge Dec 29, 2018
6d19934
py: Get optional VM stack overflow check compiling and working again.
dpgeorge Jan 4, 2019
afecc12
py: Fix location of VM returned exception in invalid opcode and comments
dpgeorge Jan 4, 2019
efe0569
esp32/mphalport: When tx'ing to REPL only release GIL if many chars sent
dpgeorge Jan 10, 2019
f350b64
esp32/modsocket: For socket read only release GIL if socket would block.
dpgeorge Jan 10, 2019
529dcce
py/modio: Make iobase_singleton object const so it goes in ROM.
dpgeorge Jan 10, 2019
5b66c7b
stm32/wdt: Make singleton WDT object const so it goes in ROM.
dpgeorge Jan 10, 2019
3431ea7
stm32/main: Make thread and FS state static and exclude when not needed.
dpgeorge Jan 10, 2019
5064df2
docs/differences: Clarify the differences are against Python 3.4.
stinos Jan 10, 2019
36808d4
esp8266/main: Activate UART(0) on dupterm for REPL before boot.py runs.
dpgeorge Jan 9, 2019
90f86a0
esp32/machine_pin: Add Pin.off() and Pin.on() methods.
dpgeorge Jan 16, 2019
eb446ec
esp32/Makefile: Use system provided math library rather than uPy one.
dpgeorge Jan 17, 2019
f102ac5
drivers/dht: Allow open-drain-high call to be DHT specific if needed.
dpgeorge Jan 21, 2019
18d3a5d
esp8266/esp_mphal: Provide mp_hal_pin_od_high_dht so DHT works reliably.
dpgeorge Jan 21, 2019
cd52d2c
esp32/modules/neopixel.py: Change NeoPixel to different default timings.
mattytrentini Jan 21, 2019
d82f344
esp32/machine_hw_spi: Use separate DMA channels for HSPI and VSPI.
dpgeorge Jan 23, 2019
da72bb6
esp32/machine_hw_spi: Make HW SPI objects statically allocated.
dpgeorge Jan 23, 2019
f874e81
lib/stm32lib: Update library to get F413 BOR defs and fix gcc 8 warning.
dpgeorge Jan 24, 2019
69e7295
docs: Add initial docs for esp32 port, including quick-ref and general.
mattytrentini Jan 21, 2019
acd6471
docs/library: Add documentation for esp32 module.
dpgeorge Jan 23, 2019
5089b3f
py/obj.h: Explicitly cast args to uint32_t in MP_OBJ_FUN_MAKE_SIG.
dpgeorge Jan 25, 2019
6d480f5
pic16bit: Update to compile with latest xc16 v1.35 compiler.
dpgeorge Jan 25, 2019
aba83e6
py/mpconfig.h: Remove parentheses from MICROPY_VERSION_xxx macros.
dpgeorge Jan 25, 2019
3e25d61
all: Bump version to 1.10.
dpgeorge Jan 25, 2019
b057fb8
codeformat
tannewt Apr 20, 2021
09f7b43
Merge MicroPython 1.10 into CircuitPython
tannewt Apr 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions docs/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@ hold/accumulate various objects.
Classes
-------

.. function:: deque(iterable, maxlen[, flags])

Deques (double-ended queues) are a list-like container that support O(1)
appends and pops from either side of the deque. New deques are created
using the following arguments:

- *iterable* must be the empty tuple, and the new deque is created empty.

- *maxlen* must be specified and the deque will be bounded to this
maximum length. Once the deque is full, any new items added will
discard items from the opposite end.

- The optional *flags* can be 1 to check for overflow when adding items.

As well as supporting `bool` and `len`, deque objects have the following
methods:

.. method:: deque.append(x)

Add *x* to the right side of the deque.
Raises IndexError if overflow checking is enabled and there is no more room left.

.. method:: deque.popleft()

Remove and return an item from the left side of the deque.
Raises IndexError if no items are present.

.. function:: namedtuple(name, fields)

This is factory function to create a new namedtuple type with a specific
Expand Down
2 changes: 0 additions & 2 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ with the ``u`` prefix dropped:
sys.rst
uctypes.rst
uselect.rst
usocket.rst
ussl.rst
uzlib.rst

Omitted functions in the ``string`` library
Expand Down
3 changes: 3 additions & 0 deletions docs/library/micropython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Functions
in a row and the lock-depth will increase, and then `heap_unlock()` must be
called the same number of times to make the heap available again.

If the REPL becomes active with the heap locked then it will be forcefully
unlocked.

.. function:: kbd_intr(chr)

Set the character that will raise a `KeyboardInterrupt` exception. By
Expand Down
136 changes: 118 additions & 18 deletions docs/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,101 @@ This module implements regular expression operations. Regular expression
syntax supported is a subset of CPython ``re`` module (and actually is
a subset of POSIX extended regular expressions).

Supported operators are:
Supported operators and special sequences are:

``'.'``
``.``
Match any character.

``'[...]'``
``[...]``
Match set of characters. Individual characters and ranges are supported,
including negated sets (e.g. ``[^a-c]``).

``'^'``
``^``
Match the start of the string.

``'$'``
``$``
Match the end of the string.

``'?'``
``?``
Match zero or one of the previous sub-pattern.

``'*'``
``*``
Match zero or more of the previous sub-pattern.

``'+'``
``+``
Match one or more of the previous sub-pattern.

``'??'``
``??``
Non-greedy version of ``?``, match zero or one, with the preference
for zero.

``'*?'``
``*?``
Non-greedy version of ``*``, match zero or more, with the preference
for the shortest match.

``'+?'``
``+?``
Non-greedy version of ``+``, match one or more, with the preference
for the shortest match.

``'|'``
``|``
Match either the left-hand side or the right-hand side sub-patterns of
this operator.

``'(...)'``
``(...)``
Grouping. Each group is capturing (a substring it captures can be accessed
with `match.group()` method).

**NOT SUPPORTED**: Counted repetitions (``{m,n}``), more advanced assertions
(``\b``, ``\B``), named groups (``(?P<name>...)``), non-capturing groups
(``(?:...)``), etc.
``\d``
Matches digit. Equivalent to ``[0-9]``.

``\D``
Matches non-digit. Equivalent to ``[^0-9]``.

``\s``
Matches whitespace. Equivalent to ``[ \t-\r]``.

``\S``
Matches non-whitespace. Equivalent to ``[^ \t-\r]``.

``\w``
Matches "word characters" (ASCII only). Equivalent to ``[A-Za-z0-9_]``.

``\W``
Matches non "word characters" (ASCII only). Equivalent to ``[^A-Za-z0-9_]``.

``\``
Escape character. Any other character following the backslash, except
for those listed above, is taken literally. For example, ``\*`` is
equivalent to literal ``*`` (not treated as the ``*`` operator).
Note that ``\r``, ``\n``, etc. are not handled specially, and will be
equivalent to literal letters ``r``, ``n``, etc. Due to this, it's
not recommended to use raw Python strings (``r""``) for regular
expressions. For example, ``r"\r\n"`` when used as the regular
expression is equivalent to ``"rn"``. To match CR character followed
by LF, use ``"\r\n"``.

**NOT SUPPORTED**:

* 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
* etc.

Example::

import ure

# As ure doesn't support escapes itself, use of r"" strings is not
# recommended.
regex = ure.compile("[\r\n]")

regex.split("line1\rline2\nline3\r\n")

# Result:
# ['line1', 'line2', 'line3', '', '']

Functions
---------
Expand All @@ -64,6 +124,22 @@ Functions
string for first position which matches regex (which still may be
0 if regex is anchored).

.. function:: sub(regex_str, replace, string, count=0, flags=0)

Compile *regex_str* and search for it in *string*, replacing all matches
with *replace*, and returning the new string.

*replace* can be a string or a function. If it is a string then escape
sequences of the form ``\<number>`` and ``\g<number>`` can be used to
expand to the corresponding group (or an empty string for unmatched groups).
If *replace* is a function then it must take a single argument (the match)
and should return a replacement string.

If *count* is specified and non-zero then substitution will stop after
this many substitutions are made. The *flags* argument is ignored.

Note: availability of this function depends on MicroPython port.

.. data:: DEBUG

Flag value, display debug information about compiled expression.
Expand All @@ -79,8 +155,10 @@ Compiled regular expression. Instances of this class are created using

.. method:: regex.match(string)
regex.search(string)
regex.sub(replace, string, count=0, flags=0)

Similar to the module-level functions :meth:`match` and :meth:`search`.
Similar to the module-level functions :meth:`match`, :meth:`search`
and :meth:`sub`.
Using methods is (much) more efficient if the same regex is applied to
multiple strings.

Expand All @@ -93,9 +171,31 @@ Compiled regular expression. Instances of this class are created using
Match objects
-------------

Match objects as returned by `match()` and `search()` methods.
Match objects as returned by `match()` and `search()` methods, and passed
to the replacement function in `sub()`.

.. method:: match.group([index])

Return matching (sub)string. *index* is 0 for entire match,
1 and above for each capturing group. Only numeric groups are supported.

.. method:: match.groups()

Return a tuple containing all the substrings of the groups of the match.

Note: availability of this method depends on MicroPython port.

.. method:: match.start([index])
match.end([index])

Return the index in the original string of the start or end of the
substring group that was matched. *index* defaults to the entire
group, otherwise it will select a group.

Note: availability of these methods depends on MicroPython port.

.. method:: match.span([index])

Returns the 2-tuple ``(match.start(index), match.end(index))``.

Note: availability of this method depends on MicroPython port.
Loading