Damien George
3123f6918b
tests: Use .errno instead of .args[0] for OSError exceptions.
...
Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 22:03:46 +10:00
Damien George
342d55529d
extmod/uasyncio: Use .errno instead of .args[0] for OSError exceptions.
...
Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 22:03:46 +10:00
Damien George
ac1d01d43e
tools/upip.py: Use .errno instead of .args[0] for OSError exceptions.
...
Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 22:03:46 +10:00
Damien George
3c4bfd1dec
py/objexcept: Support errno attribute on OSError exceptions.
...
This commit adds the errno attribute to exceptions, so code can retrieve
errno codes from an OSError using exc.errno.
The implementation here simply lets `errno` (and the existing `value`)
attributes work on any exception instance (they both alias args[0]). This
is for efficiency and to keep code size down. The pros and cons of this
are:
Pros:
- more compatible with CPython, less difference to document and learn
- OSError().errno will correctly return None, whereas the current way of
doing it via OSError().args[0] will raise an IndexError
- it reduces code size on most bare-metal ports (because they already have
the errno qstr)
- for Python code that uses exc.errno the generated bytecode is 2 bytes
smaller and more efficient to execute (compared with exc.args[0]); so
bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute,
and bytecode that is frozen saves 2 bytes flash/ROM for each use
- it's easier/shorter to type, and saves 2 bytes of space in .py files that
use it (for each use)
Cons:
- increases code size by 4-8 bytes on minimal ports that don't already have
the `errno` qstr
- all exceptions now have .errno and .value attributes (a cpydiff test is
added to address this)
See also #2407 .
Signed-off-by: Damien George <damien@micropython.org>
2021-04-23 22:03:46 +10:00
James Carr
07059dd373
Minor docs fixes in displayio.Bitmap
2021-04-23 12:56:44 +01:00
anecdata
9da8978d40
more of the same
2021-04-22 23:41:57 -05:00
anecdata
632cebafc6
fix comment (stub fail)
2021-04-22 23:33:33 -05:00
Dan Halbert
2b4c88d633
wip: partial HID, still needs rework
2021-04-23 00:18:05 -04:00
anecdata
3544d4e221
.start_ap() & .mac_address_ap
2021-04-22 22:57:07 -05:00
anecdata
3d60ed1322
loc & common_hal start_ap(), + AP MAC getter
2021-04-22 22:55:32 -05:00
anecdata
7e95dc1261
ap additions to radio object
2021-04-22 22:23:33 -05:00
anecdata
bfc5eb1660
event_handler, init, and reset
2021-04-22 22:21:50 -05:00
David Michieli
5669a60954
stm32/mboot: Allow unpacking dfu without secret key.
...
- unpack-dfu command no longer requies a secret key to be present
- pack-dfu command raises an exception if no secret key is found
2021-04-23 11:04:37 +10:00
Hosted Weblate
0ced0f9713
Update translation files
...
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-04-22 19:16:49 +02:00
Hosted Weblate
eb93317aef
Merge remote-tracking branch 'origin/main' into main
2021-04-22 19:16:47 +02:00
Jonny Bergdahl
71ec48a6db
Translated using Weblate (Swedish)
...
Currently translated at 100.0% (968 of 968 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-04-22 19:16:47 +02:00
Wellington Terumi Uemura
6d7045398d
Translated using Weblate (Portuguese (Brazil))
...
Currently translated at 100.0% (968 of 968 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-04-22 19:16:46 +02:00
Hugo Dahl
954d3dcbf9
Translated using Weblate (French)
...
Currently translated at 100.0% (968 of 968 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-04-22 19:16:46 +02:00
Jose David M
4c6bfc8399
Translated using Weblate (Spanish)
...
Currently translated at 100.0% (968 of 968 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2021-04-22 19:16:45 +02:00
Dan Halbert
8f73270f2b
Merge pull request #4646 from tannewt/merge_mp1.10
...
Merge in MicroPython v1.10
2021-04-22 13:16:27 -04:00
Jeff Epler
10fee3e673
raspberrypi: Increase PIO clock speed in ParallelImageCapture
...
.. this allows DIV_4 and DIV_2 resolutions to work without being
jumbled.
2021-04-22 12:14:44 -05:00
Jeff Epler
2def016fd0
raspberrypi: Use 32-bit elements in FIFO
...
.. these do come in the right
2021-04-22 12:14:03 -05:00
Jeff Epler
7fb751808f
raspberrypi: Implement ParallelImageCapture using PIO
...
.. based on code from Phil B.
2021-04-22 12:02:51 -05:00
Dan Halbert
c931c84e49
new cache id to fix failing xtensa builds
2021-04-22 10:45:25 -04:00
Dan Halbert
f1b5249d3c
Fix esp32s2 uart.write() return value
2021-04-22 09:47:54 -04:00
Dan Halbert
64e0958916
wip: descriptor building
2021-04-21 23:25:36 -04:00
Scott Shawcroft
09f7b43c64
Merge MicroPython 1.10 into CircuitPython
2021-04-21 15:59:17 -07:00
Scott Shawcroft
7a47213701
Merge pull request #4643 from jposada202020/improving_design_guide
...
Improving design guide
2021-04-21 15:41:25 -07:00
Dan Halbert
b3ffb3ab1f
Return bytes written from RP2040 UART.write()
2021-04-21 18:38:35 -04:00
Scott Shawcroft
e90c52e06b
Merge pull request #4641 from weblate/weblate-circuitpython-main
...
Translations update from Weblate
2021-04-21 15:31:14 -07:00
Lucian Copeland
8ce89860e6
Pass pre-commit formatting
2021-04-21 17:34:13 -04:00
Lucian Copeland
beb7e33db3
Fix attribution and revert changes to main
2021-04-21 16:34:03 -04:00
Lucian Copeland
779169da26
Reduce Simmel size
2021-04-21 13:46:31 -04:00
Damien George
00d6a79b3d
stm32/machine_timer: Improve usability of Timer constructor and init.
...
Improvements are:
- Default period is 1000ms with callback disabled.
- if period is not specified then it's not updated (previously, if period
was not specified then it was set to -1 and running the timer callback as
fast as possible, making the REPL unresponsive).
- Use uint64_t to compute delta_ms, and raise a ValueError if the period is
too large.
- If callback is not specified then it's not updated.
- Specifying None for the callback will disable the timer.
Signed-off-by: Damien George <damien@micropython.org>
2021-04-21 14:22:09 +10:00
Dan Halbert
6b18a51d57
wip: working on descriptor templates
2021-04-20 22:20:34 -04:00
jposada202020
b8253680bf
Small corrections, adding examples requirements in the design guide. SI units corrections and clarifications. Using const and Defaults to in class documentation. Building reference change.
2021-04-20 18:55:50 -04:00
Lucian Copeland
39b7d9bcf2
Fix indentation
2021-04-20 18:03:37 -04:00
jposada202020
22b72ad9a7
Merge pull request #3 from adafruit/main
...
From Main
2021-04-20 17:53:33 -04:00
Lucian Copeland
a1dc423569
Remove Alarm from small boards
2021-04-20 17:20:53 -04:00
root
0e2431048d
Fix PWMOut on SAMD21
2021-04-20 15:21:05 -05:00
Lucian Copeland
436e33e7ec
Fix CI formatting issues
2021-04-20 15:04:52 -04:00
Lucian Copeland
a702409983
Merge remote-tracking branch 'upstream/main' into nrf52-sleep
2021-04-20 14:58:24 -04:00
Jeff Epler
46c9b1bc37
atmel-sam: Use DMA for ParallelImageCapture
...
This allows ctrl-c to interrupt the capture, and ensures we handle
interrupts & background tasks.
2021-04-20 13:52:44 -05:00
Jeff Epler
d50feebd2c
atmel-sam: Factor out find_sync_event_channel_raise
2021-04-20 13:33:11 -05:00
Jeff Epler
4dcbdac97e
Complete the 'horizontal_reference' rename
2021-04-20 11:33:32 -05:00
Hosted Weblate
5f1201e7e7
Update translation files
...
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-04-20 18:02:14 +02:00
Hosted Weblate
c0f37c20cc
Merge remote-tracking branch 'origin/main' into main
2021-04-20 18:02:12 +02:00
Hugo Dahl
cd5763d368
Translated using Weblate (French)
...
Currently translated at 100.0% (968 of 968 strings)
Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2021-04-20 18:02:12 +02:00
Dan Halbert
01979acd48
Merge pull request #4604 from tannewt/buffer_size
...
Assume max characteristic size when the client
2021-04-20 12:02:06 -04:00
Scott Shawcroft
14abea2af7
Merge pull request #4622 from weblate/weblate-circuitpython-main
...
Translations update from Weblate
2021-04-20 09:01:02 -07:00