Scott Shawcroft
42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13
2021-05-06 11:17:53 -07:00
Dan Halbert
ebf9dcb47a
Merge pull request #4689 from dhalbert/dynamic-usb-descriptors
...
Dynamic USB descriptors
2021-05-06 13:51:38 -04:00
Scott Shawcroft
71d2536725
Build fixes thanks to jepler
2021-05-06 09:04:56 -07:00
Scott Shawcroft
3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod
2021-05-05 17:51:52 -07:00
Jeff Epler
ef3ec93c8b
Change the first byte of CircuitPython 'mpy' files to "C"
...
.. and also distinguish CircuitPython better in `mpy-cross --version`
2021-05-05 18:06:06 -05:00
Dan Halbert
579cdf30f1
fix more build errors
2021-05-05 16:49:29 -04:00
Jeff Epler
716a82ba67
set the coroutine generator for native generators
2021-05-05 11:36:40 -05:00
Dan Halbert
fc8e1c4c2e
address review comments
2021-05-05 12:35:12 -04:00
Jeff Epler
68d4682298
compile: Reserve labels for native await
2021-05-05 11:00:39 -05:00
Jeff Epler
8fae7d2e30
runtime.c: Fix reading properties
...
.. this fixes the vfs_fat_ramdisk failure.
2021-05-05 11:00:39 -05:00
Jeff Epler
c3ce2bacde
runtime: Remove unneeded includes
...
objtype.h got included twice, and vfs.h is unneeded.
2021-05-05 11:00:39 -05:00
Jeff Epler
14e0bdbae3
Move mp_get_stream non-inline
...
This caused a build error with external native code, as
MP_QSTR_protocol_stream was not available.
2021-05-05 11:00:35 -05:00
Jeff Epler
2c0664ea3f
slice: restore ability to construct a slice
2021-05-05 08:47:15 -05:00
Artyom Skrobov
269d5bc80a
qstr: One more cast could be avoided.
2021-05-05 09:01:47 +03:00
Scott Shawcroft
f0bb26d70f
Merge MicroPython 1.13 into CircuitPython
2021-05-04 18:06:33 -07:00
Dan Halbert
8bb3c6fd79
handle := defs in shared_bindings_matrix.py; update adafruit_hid
2021-05-04 18:07:01 -04:00
Artyom Skrobov
2d73ba2186
qstr: Use const
consistently to avoid a cast.
2021-05-04 12:53:35 -04:00
Dan Halbert
adc3d7d55e
update Python API according to review comments
2021-05-03 22:29:02 -04:00
Dan Halbert
d2b558993e
merge from main, including MicroPython 1.12 merge
2021-05-03 20:56:04 -04:00
Scott Shawcroft
b35fa44c8a
Merge MicroPython 1.12 into CircuitPython
2021-05-03 14:01:18 -07:00
Dan Halbert
94ed5e0048
Merge pull request #4696 from dhalbert/no-pulseio-on-small-boards
...
Include pulseio only on CIRCUITPY_FULL_BUILD
2021-05-03 09:35:29 -04:00
Artyom Skrobov
ca35c0059c
py/repl: Autocomplete builtin modules.
...
Doing "import <tab>" will now complete/list built-in modules.
Originally at adafruit#4548 and adafruit#4608
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
2021-05-02 23:11:14 +10:00
Artyom Skrobov
7556e01f14
py/repl: Refactor autocomplete, extracting reusable parts.
...
Originally at adafruit#4548
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
2021-05-02 23:11:12 +10:00
Artyom Skrobov
f85ea8d4fe
py/repl: Refactor autocomplete to reduce nesting.
...
Originally at adafruit#4548
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
2021-05-02 23:11:10 +10:00
scottbelden
befbff31b7
py/repl: Enter four spaces when there are no matches.
...
Originally at adafruit#1859
Signed-off-by: scottbelden <scottabelden@gmail.com>
2021-05-02 23:11:07 +10:00
Kathryn Lingel
1f1a54d0b1
py/repl: Filter private methods from tab completion.
...
Anything beginning with "_" will now only be tab-completed if there is
already a partial match for such an entry. In other words, entering
foo.<tab> will no longer complete/list anything beginning with "_".
Originally at adafruit#1850
Signed-off-by: Kathryn Lingel <kathryn@lingel.net>
2021-05-02 23:11:03 +10:00
Damien George
aa061ae391
py/scheduler: Add missing MICROPY_WRAP_MP_SCHED_EXCEPTION usage.
...
This was missed in commit 7cbf826a9575e18ce1b7fe11b0f0997509153260.
Signed-off-by: Damien George <damien@micropython.org>
2021-05-01 23:10:26 +10:00
Dan Halbert
96101016ec
Include pulseio only on CIRCUITPY_FULL_BUILD
2021-04-30 23:13:32 -04:00
Jeff Epler
da19e8e2d7
Merge remote-tracking branch 'origin/main' into fix-codeformat-subdirs
2021-04-30 15:31:08 -05:00
Jeff Epler
dfa7c3d32d
codeformat: Fix handling of **
...
After discussing with danh, I noticed that `a/**/b` would not match `a/b`.
After correcting this and re-running "pre-commit run --all", additional
files were reindented, including the codeformat script itself.
2021-04-30 15:30:13 -05:00
Scott Shawcroft
0573c17d70
Merge pull request #4690 from jepler/fix-vm-dispatch
...
py/vm.c: Restore lost bits of MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE
2021-04-30 10:40:07 -07:00
Dan Halbert
353e55d710
Merge pull request #4688 from jepler/fix-pixelbuf-subscr
...
objtype: Restore our customized behavior of instance_subscr
2021-04-30 10:45:44 -04:00
Jeff Epler
41b273e0c1
py/vm.c: Restore lost bits of MICROPY_OPT_COMPUTED_GOTO_SAVE_SPACE
...
This fixes a problem where boards that enabled this (most SAM D21s)
would crash on the first bytecode instruction.
Closes : #4686
2021-04-30 09:17:40 -05:00
Damien George
6b7c8d3e72
py/runtime: Remove commented-out code from mp_deinit().
...
These commented-out lines of code have been unused for a long time, so
remove them to avoid confusion as to why they are there.
mp_obj_dict_free() never existed, this line was converted from
mp_map_deinit() and commented out as soon as it was added. The call to
mp_map_deinit(mp_loaded_modules_map) was commented in
1a1d11fa32ba043d22995d28cbc039cfa5f3cc46.
Fixes issue #3507 .
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 16:35:14 +10:00
Damien George
916c3fd23f
py/scheduler: Add optional port hook for when something is scheduled.
...
So that a port can "wake up" when there is work to do.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:32:16 +10:00
Damien George
e9e9c76ddf
all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt.
...
To match mp_sched_exception() and mp_sched_schedule().
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Damien George
7cbf826a95
py/scheduler: Add mp_sched_exception() to schedule a pending exception.
...
This helper is added to properly set a pending exception, to mirror
mp_sched_schedule(), which schedules a function.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Damien George
7e549b6718
py/profile: Use mp_handle_pending() to raise pending exception.
...
If MICROPY_ENABLE_SCHEDULER is enabled then MP_STATE_VM(sched_state) must
be updated after handling the pending exception, which is done by the
mp_handle_pending() function.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-30 15:13:43 +10:00
Jeff Epler
d1e17fdccc
objtype: Restore our customized behavior of instance_subscr
...
For pixelbuf's [] to be able to call _transmit on the Python subclass,
we need to do the subscripting operation specially.
2021-04-29 11:59:11 -05:00
microDev
1b972c51c3
add authmode class
2021-04-29 18:42:36 +05:30
Dan Halbert
f06d54524d
merge from adafruit
2021-04-28 23:48:26 -04:00
Dan Halbert
8500e846c6
partially working
2021-04-27 23:53:23 -04:00
Dan Halbert
f98a54628b
wip: compiles
2021-04-27 14:37:36 -04:00
Scott Shawcroft
17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
...
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Damien George
c5cbfd545a
py/dynruntime.h: Add mp_obj_get_array() function.
...
Signed-off-by: Damien George <damien@micropython.org>
2021-04-28 00:06:46 +10:00
Damien George
d4b706c4d0
py: Add option to compile without any error messages at all.
...
This introduces a new option, MICROPY_ERROR_REPORTING_NONE, which
completely disables all error messages. To be used in cases where
MicroPython needs to fit in very limited systems.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-27 23:51:52 +10:00
Dan Halbert
7a40b4daec
very much WIP
2021-04-26 23:54:01 -04:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython
2021-04-26 15:47:41 -07:00
Dan Halbert
c26e49c2e6
wip: starting to try to compile
2021-04-25 23:17:41 -04:00
Dan Halbert
9d1fcc3b14
merge from main
2021-04-25 10:27:52 -04:00