summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2020-04-17RGBMatrix: finish renaming from ProtomatterJeff Epler
This gets all the purely internal references. Some uses of protomatter/Protomatter/PROTOMATTER remain, as they are references to symbols in the Protomatter C library itself.
2020-04-17Rename Protomatter -> RGBMatrixJeff Epler
This is a quick rename, it changes the user-facing names but not the internal names of things.
2020-04-17Rename _protomatter -> protomatterJeff Epler
I originally believed that there would be a wrapper library around it, like with _pixelbuf; but this proves not to be the case, as there's too little for the library to do.
2020-04-14Make stripping circuitpython optional, not the defaultJeff Epler
2020-04-14Add Protomatter and FramebufferDisplayJeff Epler
2020-04-14py.mk: update warning flags needed for ulabJeff Epler
2020-03-20runtime: Improve error message when setting read-only propertyJeff Epler
Formerly, if you wrote SPI.frequency = 0 you would get the sightly erroneous error message AttributeError: 'SPI' object has no attribute 'frequency' In this case, a better message would read AttributeError: 'SPI' object cannot assign attribute 'frequency' This new message will both be used in the case where the attribute doesn't exist at all (and the object has no dynamic attributes; most instances of built in types behave this way), or if the attribute exists but is read-only.
2020-03-17ulab: include new 'extras' source fileJeff Epler
2020-03-17ulab: rename enable macro so it appears in the support matrixJeff Epler
2020-03-17objslice: take mp_obj_slice_indices from micropythonJeff Epler
2020-03-10Merge pull request #2690 from jepler/topic-pep-498-fstringsScott Shawcroft
Implement partial PEP-498 (f-string) support
2020-03-09circuitpy_mpconfig.mk: Enable ULAB for "full builds"Jeff Epler
This enables it on the imxrt and cds56 ports where it was disabled before
2020-03-09f-strings: Make optional, defaulting to !CIRCUITPY_MINIMAL_BUILDJeff Epler
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)
2020-03-09lexer: catch concatenation of f'' and '' stringsJeff Epler
This turns the "edge case" into a parse-time error.
2020-03-09Address dpgeorge feedback - largely simplificationsJosh Klar
2020-03-09py: Implement partial PEP-498 (f-string) supportJosh Klar
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](https://github.com/micropython/micropython/commit/534b7c368dc2af7720f3aaed0c936ef46d773957), 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.
2020-03-05Merge pull request #2657 from tannewt/builtin_packageJeff Epler
Support importing native modules in native packages.
2020-03-03Merge remote-tracking branch 'origin/master' into ulabJeff Epler
2020-03-03Remove debug externScott Shawcroft
2020-03-01compile: Give a proper error on 'async with'/'async for' outside 'async def'Jeff Epler
A simple reproducer is: async for x in():x
2020-03-01parse: push_result_token: throw an exception on too-long namesJeff Epler
Before this, such names would instead cause an assertion error inside qstr_from_strn. A simple reproducer is a python source file containing the letter "a" repeated 256 times
2020-02-27Update ulab from upstream againJeff Epler
2020-02-27ulab: Incorporate itJeff Epler
2020-02-26Validate builtin member is a moduleScott Shawcroft
2020-02-25Support importing native modules in native packages.Scott Shawcroft
This only fixes the `import` portion. It doesn't actually change reference behavior because modules within a package could already be referenced through the parent package even though an error should have been thrown.
2020-02-20Enable _bleio adapter when _bleio is importedDan Halbert
2020-02-20Disable BLE file service for nowScott Shawcroft
Fixes #2633
2020-02-14Implement to_bytes(..., signed=True)Dan Halbert
2020-02-13Merge pull request #2581 from jamesbowman/masterScott Shawcroft
First draft of eveL, the low-level module of the Gameduino bindings
2020-02-11Track first free atb for multiple block sizes.Scott Shawcroft
This speeds up cases where no single block allocations happen while Python code is allocating other block sizes.
2020-02-07Split into shared-module and shared-bindingsJames Bowman
2020-02-05Rename eveL to _eve, EVEL to _EVEJames Bowman
2020-02-04fix printing single-arg exceptionsDan Halbert
2020-02-04fix multi-arg exception printingDan Halbert
2020-02-04preserve errno in OSErrorDan Halbert
2020-02-04Include filename for 'No such file/directory', etc.Dan Halbert
2020-02-03Correct default state to off for eveL module.James Bowman
Fix build break because of overflowing small ports
2020-02-03First draft of eveL, the low-level module of the Gameduino (and BridgeTek ↵James Bowman
EVE) bindings. [adafruit/circuitpython#2578]
2020-01-30Merge remote-tracking branch 'adafruit/master' into tweak_pixelbufScott Shawcroft
2020-01-30Remove unneeded native cast.Scott Shawcroft
2020-01-29Tweak error messages to reduce code size.Scott Shawcroft
2020-01-29Merge commit 'b36b24' into tweak_pixelbufScott Shawcroft
2020-01-29Merge pull request #2551 from jepler/build-mpy-cross-static-linux-win64Scott Shawcroft
Build static binaries of mpy-cross for desktop linux, desktop windows, mac, and raspbian
2020-01-27Fix subclassing of objects that are tested. Others may still be broken.Scott Shawcroft
2020-01-27Merge pull request #2532 from tannewt/teensy4-devScott Shawcroft
Refine iMX RT memory layout and add three boards
2020-01-25accomodate excessively old gcc versions for raspbian mpy-cross cross-buildJeff Epler
2020-01-24Don't assume native methods want the native object as self.Scott Shawcroft
2020-01-21Update fix (missing pragma gcc diagnostic push)tsupplis
Update fix (missing pragma gcc diagnostic push)
2020-01-17Refine iMX RT memory layout and add three boardsScott Shawcroft
Introduces a way to place CircuitPython code and data into tightly coupled memory (TCM) which is accessible by the CPU in a single cycle. It also frees up room in the corresponding cache for intermittent data. Loading from external flash is slow! The data cache is also now enabled. Adds support for the iMX RT 1021 chip. Adds three new boards: * iMX RT 1020 EVK * iMX RT 1060 EVK * Teensy 4.0 Related to #2492, #2472 and #2477. Fixes #2475.
2020-01-15Merge pull request #2510 from dhalbert/bonding-nvmScott Shawcroft
nrf: Add bonding to BLE pairing support