15306 Commits (aa54a7e76e1f40c6811ce7a6df02546a719d80e8)
 

Author SHA1 Message Date
Jeff Epler aa54a7e76e ulab: update documentation 3 years ago
Jeff Epler 69aa010cfc objslice: take mp_obj_slice_indices from micropython 3 years ago
Jeff Epler 772ac705d3 update ulab 3 years ago
Scott Shawcroft 3a5f79acef
Merge pull request #2701 from hierophect/stm32-submodule-swap
STM32: Change ST drivers submodule to match TinyUSB
3 years ago
Scott Shawcroft 85f44e20cb
Merge pull request #2695 from TG-Techie/master
Add new TG-Watch02A to the nrf boards directory
3 years ago
TG-Techie 137d5c34fa fix board sorting (due to T being before a anf t) 3 years ago
TG-Techie 7907ef5979 add TG-Watch02A to build workflow 3 years ago
Lucian Copeland ef7370d023 Change ST drivers submodule to match TinyUSB 3 years ago
hierophect 0f64663c40
Merge pull request #2699 from hierophect/stm32-port-namechange
STM32: port directory name change
3 years ago
Lucian Copeland 18442c5b00 Merge remote-tracking branch 'upstream/master' into stm32-port-namechange 3 years ago
hierophect dd21ec048a
Merge pull request #2697 from hierophect/stm32-pulsein
STM32: add PulseIn module
3 years ago
Lucian Copeland 0155fab356 Revise style on interrupt handler functions 3 years ago
Lucian Copeland ead32ea6e6 Comment change for CI 3 years ago
TG-Techie 197dc344af fix requested changes 3 years ago
Lucian Copeland f81e2c0487 change CI target 3 years ago
Lucian Copeland 7ff336fbc5 Change docs target 3 years ago
Lucian Copeland 127e531271 remove old directory 3 years ago
Lucian Copeland be7def128a submodule move and sync 3 years ago
Lucian Copeland 53b1544f41 create copy 3 years ago
Lucian Copeland 2a082baa63 Add up to date translations 3 years ago
Lucian Copeland 38064750f9 Merge remote-tracking branch 'upstream/master' into stm32-pulsein 3 years ago
Lucian Copeland 2b161d37df stm32: add PulseIn module 3 years ago
TG-Techie b967a2071f changed TG-Watch02A HW_BOARD_NAME 3 years ago
TG-Techie 50b451ae0c add TG-Watch02A board def 3 years ago
Scott Shawcroft d988af02d1
Merge pull request #2690 from jepler/topic-pep-498-fstrings
Implement partial PEP-498 (f-string) support
3 years ago
Dan Halbert 6363b5ad06
Merge pull request #2693 from jepler/ulab-enable
ulab: enable on most builds
3 years ago
Jeff Epler 03a2b2faf1 ulab: don't enable on m0 boards 3 years ago
Jeff Epler ef195d6e1b Update tests
* string_pep498_fstring.py: Not compatible with python3.5
 * cmd_parsetree.py: enumerated constants changed
3 years ago
Scott Shawcroft df88939128
Merge pull request #2666 from dhalbert/assert_pin-and-mp_const_none-cleanup
validate various displayio args; new pin validation routines; don't use mp_const_none if NULL will do
3 years ago
Scott Shawcroft eebe769973
Merge pull request #2692 from jepler/ulab-upstream
ulab: Use https://github.com/v923z/micropython-ulab/
3 years ago
Jeff Epler 491a31a731 circuitpy_mpconfig.mk: Enable ULAB for "full builds"
This enables it on the imxrt and cds56 ports where it was disabled before
3 years ago
Jeff Epler 66aa0dec60 stm32: enable ulab
This is needed because stm32 defines CIRCUITPY_MINIMAL_BUILD "for early
port".
3 years ago
Jeff Epler e128d770f1 cdx56: prepare to enable ulab
This involves fixing support for SRC_MOD and enabling INTERNAL_LIBM
including adding support for SRC_LIBM.
3 years ago
Jeff Epler eab9b670d8 ulab: Use https://github.com/v923z/micropython-ulab/
The only delta we were carrying was in the README.
3 years ago
Jeff Epler 473e9c5ffb f-strings: Make optional, defaulting to !CIRCUITPY_MINIMAL_BUILD
This should reclaim *most* code space added to handle f-strings.
However, there may be some small code growth as parse_string_literal
takes a new parameter (which will always be 0, so hopefully the optimizer
eliminates it)
3 years ago
Jeff Epler 32647cd9b4 lexer: catch concatenation of f'' and '' strings
This turns the "edge case" into a parse-time error.
3 years ago
Jeff Epler acd7b8932f locale: run 'make translate' 3 years ago
Josh Klar 40bc05ee1e Address dpgeorge feedback - largely simplifications 3 years ago
Josh Klar 3a7a5ba686 py: Implement partial PEP-498 (f-string) support
This implements (most of) the PEP-498 spec for f-strings, with two
exceptions:

- raw f-strings (`fr` or `rf` prefixes) raise `NotImplementedError`
- one special corner case does not function as specified in the PEP
(more on that in a moment)

This is implemented in the core as a syntax translation, brute-forcing
all f-strings to run through `String.format`. For example, the statement
`x='world'; print(f'hello {x}')` gets translated *at a syntax level*
(injected into the lexer) to `x='world'; print('hello {}'.format(x))`.
While this may lead to weird column results in tracebacks, it seemed
like the fastest, most efficient, and *likely* most RAM-friendly option,
despite being implemented under the hood with a completely separate
`vstr_t`.

Since [string concatenation of adjacent literals is implemented in the
lexer](534b7c368d),
two side effects emerge:

- All strings with at least one f-string portion are concatenated into a
single literal which *must* be run through `String.format()` wholesale,
and:
- Concatenation of a raw string with interpolation characters with an
f-string will cause `IndexError`/`KeyError`, which is both different
from CPython *and* different from the corner case mentioned in the PEP
(which gave an example of the following:)

```python
x = 10
y = 'hi'
assert ('a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e') == 'ab10{c}str< hi >de'
```

The above-linked commit detailed a pretty solid case for leaving string
concatenation in the lexer rather than putting it in the parser, and
undoing that decision would likely be disproportionately costly on
resources for the sake of a probably-low-impact corner case. An
alternative to become complaint with this corner case of the PEP would
be to revert to string concatenation in the parser *only when an
f-string is part of concatenation*, though I've done no investigation on
the difficulty or costs of doing this.

A decent set of tests is included. I've manually tested this on the
`unix` port on Linux and on a Feather M4 Express (`atmel-samd`) and
things seem sane.
3 years ago
Limor "Ladyada" Fried 83d5da95b7
Merge pull request #2684 from caternuson/doc_add_sensors
Add proximity and sound_level to Design Guide
3 years ago
caternuson 125409fe95 add proximity and sound_level 3 years ago
TG-Techie fec84054d9 ah 3 years ago
Dan Halbert fdcdc1320b Make ParallelBus reset ping arg required 3 years ago
TG-Techie 7198056bc3
Merge pull request #2 from adafruit/5.0.x
5.0.x
3 years ago
TG-Techie 03dfd28121 trying to pull 5.0.x 3 years ago
Dan Halbert 127e6fa27e Revert "try actions/checkout@v2"
This reverts commit b492ea69cb.
3 years ago
Dan Halbert b492ea69cb try actions/checkout@v2 3 years ago
Dan Halbert 210c3274e5 Merge remote-tracking branch 'adafruit/master' into assert_pin-and-mp_const_none-cleanup 3 years ago
Dan Halbert 817b5be320 rename routines to be clearer; fix wiznet arg types 3 years ago
Jeff Epler 4fa90261a3
Merge pull request #2657 from tannewt/builtin_package
Support importing native modules in native packages.
3 years ago