Skip to content

Commit 25437dc

Browse files
committed
Merge branch 'main' into atexit
2 parents 6c76376 + 60c0271 commit 25437dc

File tree

294 files changed

+7661
-2557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+7661
-2557
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ jobs:
7979
- name: Test all
8080
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1
8181
working-directory: tests
82+
- name: Print failure info
83+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --print-failures
84+
if: failure()
85+
working-directory: tests
8286
- name: Native Tests
8387
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py -j1 --emit native
8488
working-directory: tests
@@ -228,6 +232,7 @@ jobs:
228232
- "bdmicro_vina_d51_pcb7"
229233
- "bless_dev_board_multi_sensor"
230234
- "blm_badge"
235+
- "bluemicro840"
231236
- "capablerobot_usbhub"
232237
- "catwan_usbstick"
233238
- "circuitbrains_basic_m0"
@@ -321,11 +326,13 @@ jobs:
321326
- "pewpew10"
322327
- "pewpew_m4"
323328
- "picoplanet"
329+
- "pimoroni_interstate75"
324330
- "pimoroni_keybow2040"
325331
- "pimoroni_pga2040"
326332
- "pimoroni_picolipo_16mb"
327333
- "pimoroni_picolipo_4mb"
328334
- "pimoroni_picosystem"
335+
- "pimoroni_plasma2040"
329336
- "pimoroni_tiny2040"
330337
- "pitaya_go"
331338
- "pyb_nano_v2"
@@ -341,6 +348,7 @@ jobs:
341348
- "qtpy_m0_haxpress"
342349
- "raspberry_pi_pico"
343350
- "raytac_mdbt50q-db-40"
351+
- "raytac_mdbt50q-rx"
344352
- "robohatmm1_m4"
345353
- "sam32"
346354
- "same54_xplained"
@@ -364,6 +372,7 @@ jobs:
364372
- "sparkfun_samd21_mini"
365373
- "sparkfun_samd51_micromod"
366374
- "sparkfun_samd51_thing_plus"
375+
- "sparkfun_stm32f405_micromod"
367376
- "sparkfun_thing_plus_rp2040"
368377
- "spresense"
369378
- "stackrduino_m0_pro"
@@ -455,7 +464,7 @@ jobs:
455464
- name: Install deps
456465
run: |
457466
sudo apt-get install -y gettext
458-
pip install requests sh click setuptools awscli
467+
pip install -r requirements-dev.txt
459468
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
460469
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
461470
- name: Versions
@@ -495,19 +504,27 @@ jobs:
495504
- "adafruit_funhouse"
496505
- "adafruit_magtag_2.9_grayscale"
497506
- "adafruit_metro_esp32s2"
507+
- "ai_thinker_esp_12k_nodemcu"
498508
- "artisense_rd00"
499509
- "atmegazero_esp32s2"
510+
- "crumpspace_crumps2"
500511
- "electroniccats_bastwifi"
501512
- "espressif_kaluga_1"
502513
- "espressif_kaluga_1.3"
503514
- "espressif_saola_1_wroom"
504515
- "espressif_saola_1_wrover"
505516
- "franzininho_wifi_wroom"
506517
- "franzininho_wifi_wrover"
518+
- "gravitech_cucumber_m"
519+
- "gravitech_cucumber_ms"
520+
- "gravitech_cucumber_r"
521+
- "gravitech_cucumber_rs"
507522
- "lilygo_ttgo_t8_s2_st7789"
508523
- "microdev_micro_s2"
524+
- "morpheans_morphesp-240"
509525
- "muselab_nanoesp32_s2_wroom"
510526
- "muselab_nanoesp32_s2_wrover"
527+
- "odt_pixelwing_esp32_s2"
511528
- "targett_module_clip_wroom"
512529
- "targett_module_clip_wrover"
513530
- "unexpectedmaker_feathers2"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,6 @@
188188
[submodule "frozen/Adafruit_CircuitPython_SimpleIO"]
189189
path = frozen/Adafruit_CircuitPython_SimpleIO
190190
url = https://github.com/adafruit/adafruit_circuitpython_simpleio
191+
[submodule "lib/quirc"]
192+
path = lib/quirc
193+
url = https://github.com/adafruit/quirc.git

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ besides a text editor (we recommend `Mu <https://codewith.mu/>`_ for beginners.)
2121
Starting with CircuitPython 7.0.0, some boards may only be connectable over Bluetooth Low Energy
2222
(BLE). Those boards provide serial and file access over BLE instead of USB using open protocols.
2323
(Some boards may use both USB and BLE.) BLE access can be done from a variety of apps including
24-
`code.circuitpythonn.org <https://code.circuitpython.org>`_.
24+
`code.circuitpython.org <https://code.circuitpython.org>`_.
2525

2626
CircuitPython features unified Python core APIs and a growing list of 300+ device libraries and
2727
drivers that work with it. These libraries also work on single board computers with regular

docs/common_hal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ These instructions also apply to `analogio`, `busio`, `pulseio` and `touchio`. M
77
Common HAL related files are found in these locations:
88

99
* `shared-bindings` Shared home for the Python <-> C bindings which includes inline RST documentation for the created interfaces. The common hal functions are defined in the .h files of the corresponding C files.
10-
* `shared-modules` Shared home for C code built on the Common HAL and used by all ports. This code only uses `common_hal` methods defined in `shared-bindings`.
10+
* `shared-module` Shared home for C code built on the Common HAL and used by all ports. This code only uses `common_hal` methods defined in `shared-bindings`.
1111
* `<port>/common-hal` Port-specific implementation of the Common HAL.
1212

1313
Each folder has the substructure of <python module name>/<class name> and they should match 1:1. `__init__.c` is used for module globals that are not classes (similar to `__init__.py`).

docs/redirects.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ shared-bindings/ustack/__init__.rst shared-bindings/ustack/
152152
shared-bindings/vectorio/Circle.rst shared-bindings/vectorio/#vectorio.Circle
153153
shared-bindings/vectorio/Polygon.rst shared-bindings/vectorio/#vectorio.Polygon
154154
shared-bindings/vectorio/Rectangle.rst shared-bindings/vectorio/#vectorio.Rectangle
155-
shared-bindings/vectorio/VectorShape.rst shared-bindings/vectorio/#vectorio.VectorShape
156155
shared-bindings/vectorio/__init__.rst shared-bindings/vectorio/
157156
shared-bindings/watchdog/WatchDogMode.rst shared-bindings/watchdog/#watchdog.WatchDogMode
158157
shared-bindings/watchdog/WatchDogTimer.rst shared-bindings/watchdog/#watchdog.WatchDogTimer

lib/quirc

Submodule quirc added at 8c6ffa2

lib/tinyusb

Submodule tinyusb updated 104 files

lib/utils/pyexec.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
167167
mp_hal_stdout_tx_strn("\x04", 1);
168168
}
169169
// check for SystemExit
170-
if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(((mp_obj_base_t *)nlr.ret_val)->type), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) {
170+
if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), MP_OBJ_FROM_PTR(&mp_type_SystemExit))) {
171171
// at the moment, the value of SystemExit is unused
172172
ret = pyexec_system_exit;
173173
#if CIRCUITPY_ALARM
@@ -183,7 +183,12 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
183183
}
184184
if (result != NULL) {
185185
result->return_code = ret;
186+
#if CIRCUITPY_ALARM
187+
// Don't set the exception object if we exited for deep sleep.
188+
if (ret != 0 && ret != PYEXEC_DEEP_SLEEP) {
189+
#else
186190
if (ret != 0) {
191+
#endif
187192
mp_obj_t return_value = (mp_obj_t)nlr.ret_val;
188193
result->exception = return_value;
189194
result->exception_line = -1;
@@ -260,7 +265,7 @@ STATIC mp_uint_t mp_reader_stdin_readbyte(void *data) {
260265
mp_hal_stdout_tx_strn("\x04", 1); // indicate end to host
261266
if (c == CHAR_CTRL_C) {
262267
#if MICROPY_KBD_EXCEPTION
263-
MP_STATE_VM(mp_kbd_exception).traceback_data = NULL;
268+
MP_STATE_VM(mp_kbd_exception).traceback->data = NULL;
264269
nlr_raise(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)));
265270
#else
266271
mp_raise_type(&mp_type_KeyboardInterrupt);

locale/ID.po

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ msgstr "indeks %q harus bilangan bulat, bukan %s"
9898
msgid "%q length must be %q"
9999
msgstr ""
100100

101+
#: shared-bindings/usb_hid/Device.c
102+
msgid "%q length must be >= 1"
103+
msgstr ""
104+
101105
#: shared-bindings/vectorio/Polygon.c
102106
msgid "%q list must be a list"
103107
msgstr "daftar %q harus berupa daftar"
@@ -110,14 +114,6 @@ msgstr ""
110114
msgid "%q must be %d-%d"
111115
msgstr ""
112116

113-
#: shared-bindings/usb_hid/Device.c
114-
msgid "%q must be 0-255"
115-
msgstr ""
116-
117-
#: shared-bindings/usb_hid/Device.c
118-
msgid "%q must be 1-255"
119-
msgstr ""
120-
121117
#: py/argcheck.c
122118
msgid "%q must be >= %d"
123119
msgstr ""
@@ -134,10 +130,6 @@ msgstr "%q harus >= 0"
134130
msgid "%q must be >= 1"
135131
msgstr "%q harus >= 1"
136132

137-
#: shared-bindings/usb_hid/Device.c
138-
msgid "%q must be None or between 1 and len(report_descriptor)-1"
139-
msgstr ""
140-
141133
#: py/argcheck.c
142134
msgid "%q must be a string"
143135
msgstr ""
@@ -175,6 +167,10 @@ msgstr "%q harus berupa int"
175167
msgid "%q() takes %d positional arguments but %d were given"
176168
msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan"
177169

170+
#: shared-bindings/usb_hid/Device.c
171+
msgid "%q, %q, and %q must all be the same length"
172+
msgstr ""
173+
178174
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
179175
#, c-format
180176
msgid "%s error 0x%x"
@@ -325,6 +321,10 @@ msgstr "'yield from' di dalam fungsi async"
325321
msgid "'yield' outside function"
326322
msgstr "'yield' diluar fungsi"
327323

324+
#: shared-module/vectorio/VectorShape.c
325+
msgid "(x,y) integers required"
326+
msgstr ""
327+
328328
#: py/compile.c
329329
msgid "*x must be assignment target"
330330
msgstr "*x harus menjadi target assignment"
@@ -496,6 +496,10 @@ msgstr ""
496496
msgid "Attempted heap allocation when VM not running."
497497
msgstr ""
498498

499+
#: ports/raspberrypi/audio_dma.c
500+
msgid "Audio conversion not implemented"
501+
msgstr ""
502+
499503
#: shared-bindings/wifi/Radio.c
500504
msgid "AuthMode.OPEN is not used with password"
501505
msgstr ""
@@ -1205,11 +1209,6 @@ msgstr ""
12051209
msgid "Input/output error"
12061210
msgstr "Kesalahan input/output"
12071211

1208-
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1209-
#, c-format
1210-
msgid "Missing jmp_pin. Instruction %d jumps on pin"
1211-
msgstr ""
1212-
12131212
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
12141213
#, c-format
12151214
msgid "Instruction %d shifts in more bits than pin count"
@@ -1238,6 +1237,10 @@ msgstr "Otentikasi tidak cukup"
12381237
msgid "Insufficient encryption"
12391238
msgstr "Enkripsi tidak cukup"
12401239

1240+
#: ports/raspberrypi/audio_dma.c
1241+
msgid "Internal audio buffer too small"
1242+
msgstr ""
1243+
12411244
#: ports/stm/common-hal/busio/UART.c
12421245
msgid "Internal define error"
12431246
msgstr "Kesalahan definisi internal"
@@ -1247,7 +1250,7 @@ msgstr "Kesalahan definisi internal"
12471250
msgid "Internal error #%d"
12481251
msgstr "Kesalahan internal #%d"
12491252

1250-
#: shared-bindings/sdioio/SDCard.c
1253+
#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c
12511254
msgid "Invalid %q"
12521255
msgstr ""
12531256

@@ -1526,6 +1529,16 @@ msgstr ""
15261529
msgid "Missing first_set_pin. Instruction %d sets pin(s)"
15271530
msgstr ""
15281531

1532+
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
1533+
#, c-format
1534+
msgid "Missing jmp_pin. Instruction %d jumps on pin"
1535+
msgstr ""
1536+
1537+
#: shared-module/usb_hid/Device.c
1538+
#, c-format
1539+
msgid "More than %d report ids not supported"
1540+
msgstr ""
1541+
15291542
#: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c
15301543
msgid "Must be a %q subclass."
15311544
msgstr "Harus berupa subclass %q."
@@ -1907,21 +1920,6 @@ msgstr "Tambahkan module apapun pada filesystem\n"
19071920
msgid "Polygon needs at least 3 points"
19081921
msgstr ""
19091922

1910-
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
1911-
msgid ""
1912-
"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle "
1913-
"instead"
1914-
msgstr ""
1915-
1916-
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
1917-
#: ports/cxd56/common-hal/pulseio/PulseOut.c
1918-
#: ports/nrf/common-hal/pulseio/PulseOut.c
1919-
#: ports/stm/common-hal/pulseio/PulseOut.c
1920-
msgid ""
1921-
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
1922-
"instead"
1923-
msgstr ""
1924-
19251923
#: shared-bindings/_bleio/Adapter.c
19261924
msgid "Prefix buffer must be on the heap"
19271925
msgstr "Buffer awalan harus ada di heap"
@@ -2112,7 +2110,6 @@ msgid "Size not supported"
21122110
msgstr ""
21132111

21142112
#: ports/raspberrypi/common-hal/alarm/SleepMemory.c
2115-
#: ports/stm/common-hal/alarm/SleepMemory.c
21162113
msgid "Sleep Memory not available"
21172114
msgstr ""
21182115

@@ -2567,7 +2564,7 @@ msgid "argument name reused"
25672564
msgstr ""
25682565

25692566
#: py/argcheck.c shared-bindings/_stage/__init__.c
2570-
#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c
2567+
#: shared-bindings/digitalio/DigitalInOut.c
25712568
msgid "argument num/types mismatch"
25722569
msgstr "argumen num/types tidak cocok"
25732570

@@ -3131,6 +3128,10 @@ msgstr ""
31313128
msgid "file must be a file opened in byte mode"
31323129
msgstr ""
31333130

3131+
#: shared-bindings/traceback/__init__.c
3132+
msgid "file write is not available"
3133+
msgstr ""
3134+
31343135
#: shared-bindings/storage/__init__.c
31353136
msgid "filesystem must provide mount method"
31363137
msgstr ""
@@ -3418,6 +3419,10 @@ msgstr ""
34183419
msgid "invalid element_size %d, must be, 1, 2, or 4"
34193420
msgstr ""
34203421

3422+
#: shared-bindings/traceback/__init__.c
3423+
msgid "invalid exception"
3424+
msgstr ""
3425+
34213426
#: extmod/modframebuf.c
34223427
msgid "invalid format"
34233428
msgstr "format tidak valid"
@@ -3455,6 +3460,10 @@ msgstr ""
34553460
msgid "invalid syntax for number"
34563461
msgstr ""
34573462

3463+
#: py/objexcept.c shared-bindings/traceback/__init__.c
3464+
msgid "invalid traceback"
3465+
msgstr ""
3466+
34583467
#: py/objtype.c
34593468
msgid "issubclass() arg 1 must be a class"
34603469
msgstr ""
@@ -3651,10 +3660,6 @@ msgstr ""
36513660
msgid "no active exception to reraise"
36523661
msgstr ""
36533662

3654-
#: shared-bindings/socket/__init__.c shared-module/network/__init__.c
3655-
msgid "no available NIC"
3656-
msgstr ""
3657-
36583663
#: py/compile.c
36593664
msgid "no binding for nonlocal found"
36603665
msgstr "tidak ada ikatan/bind pada temuan nonlocal"
@@ -3950,6 +3955,10 @@ msgstr ""
39503955
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
39513956
#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h
39523957
#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h
3958+
#: ports/esp32s2/boards/gravitech_cucumber_m/mpconfigboard.h
3959+
#: ports/esp32s2/boards/gravitech_cucumber_ms/mpconfigboard.h
3960+
#: ports/esp32s2/boards/gravitech_cucumber_r/mpconfigboard.h
3961+
#: ports/esp32s2/boards/gravitech_cucumber_rs/mpconfigboard.h
39533962
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
39543963
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
39553964
#: ports/esp32s2/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h
@@ -4148,7 +4157,7 @@ msgstr ""
41484157
msgid "stop not reachable from start"
41494158
msgstr ""
41504159

4151-
#: py/stream.c
4160+
#: py/stream.c shared-bindings/getpass/__init__.c
41524161
msgid "stream operation not supported"
41534162
msgstr ""
41544163

@@ -4357,7 +4366,7 @@ msgid "unreadable attribute"
43574366
msgstr ""
43584367

43594368
#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c
4360-
#: shared-module/vectorio/Polygon.c
4369+
#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c
43614370
msgid "unsupported %q type"
43624371
msgstr ""
43634372

0 commit comments

Comments
 (0)