summaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
2020-04-14ulab: Get updates from upstreamJeff Epler
2020-04-13ulab: Get updates from upstreamJeff Epler
2020-03-17update ulabJeff Epler
2020-03-09ulab: Use https://github.com/v923z/micropython-ulab/Jeff Epler
The only delta we were carrying was in the README.
2020-02-27Update ulab from upstream againJeff Epler
2020-02-27ulab: Incorporate itJeff Epler
2020-02-14avoid os.stat() int overflow on smallint-only buildsDan Halbert
2020-02-04preserve errno in OSErrorDan Halbert
2020-02-04Include filename for 'No such file/directory', etc.Dan Halbert
2020-01-27Fix subclassing of objects that are tested. Others may still be broken.Scott Shawcroft
2020-01-02remove unnecessary GCC pragmasRoy Hooper
2020-01-02raise mp_raise_NotImplementedErrorRoy Hooper
2019-12-13Revert subscr signature changeRoy Hooper
2019-12-13push changesRoy Hooper
2019-12-10Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-04protocols: Allow them to be (optionally) type-safeJeff Epler
Protocols are nice, but there is no way for C code to verify whether a type's "protocol" structure actually implements some particular protocol. As a result, you can pass an object that implements the "vfs" protocol to one that expects the "stream" protocol, and the opposite of awesomeness ensues. This patch adds an OPTIONAL (but enabled by default) protocol identifier as the first member of any protocol structure. This identifier is simply a unique QSTR chosen by the protocol designer and used by each protocol implementer. When checking for protocol support, instead of just checking whether the object's type has a non-NULL protocol field, use `mp_proto_get` which implements the protocol check when possible. The existing protocols are now named: protocol_framebuf protocol_i2c protocol_pin protocol_stream protocol_spi protocol_vfs (most of these are unused in CP and are just inherited from MP; vfs and stream are definitely used though) I did not find any crashing examples, but here's one to give a flavor of what is improved, using `micropython_coverage`. Before the change, the vfs "ioctl" protocol is invoked, and the result is not intelligible as json (but it could have resulted in a hard fault, potentially): >>> import uos, ujson >>> u = uos.VfsPosix('/tmp') >>> ujson.load(u) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: syntax error in JSON After the change, the vfs object is correctly detected as not supporting the stream protocol: >>> ujson.load(p) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: stream operation not supported
2019-11-26remove unnecessary intermediate mp_obj_subscr wrapperRoy Hooper
2019-11-23disable -Wunused-parameter on subscr functionsRoy Hooper
2019-11-23Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-11-23make ->subscr take an instance to pass when instance_subscr is called from ↵Roy Hooper
subscr.
2019-10-13Move font dependency to extmod from stm32Dan Halbert
2019-03-13Prevent other filesystem changes besides file writesScott Shawcroft
Such as moving files, adding directories and changing the label.
2019-03-13Throw an error when moving a directory into itself.Scott Shawcroft
Fixes #1192
2019-02-21Merge pull request #1584 from tannewt/disable_concurrent_write_protectionDan Halbert
Add option to disable the concurrent write protection
2019-02-21Merge pull request #1582 from dhalbert/remove-u-namesScott Shawcroft
rename ure, ujson, and uerrno to re, json, and errno
2019-02-21conditionalize re object type nameDan Halbert
2019-02-21Add option to disable the concurrent write protectionScott Shawcroft
This allows writing to the filesystem from the host computer and CircuitPython by increasing the risk of filesystem corruption.
2019-02-21Add CIRCUITPY macro; rename u* only when CIRCUITPY=1Dan Halbert
2019-02-21rename ure, ujson, and uerrno to re, json, and errnoDan Halbert
2019-02-19Prevent infinite display update recursion and fix VFS mountingScott Shawcroft
Fixes #1529
2019-02-14extmod/ure: Support search/match() pos and endpos parametersNoralf Trønnes
MICROPY_PY_URE_MATCH_SPAN_START_END is used to enable the functionality since it's similar.
2019-02-14extmod/ure: Handle some escape sequences.Radomir Dopieralski
Fix MicroPython #3176 Handle escape sequences inside regular expressions. This adds handling for \a, \b, \f, \n, \r, \v and \\.
2019-02-14extmod/modure: Add ure.sub() function and method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_SUB, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2019-02-14extmod/modure: Add match.span(), start() and end() methods, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2019-02-14extmod/modure: Add match.groups() method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_GROUPS, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2019-02-04Fix allocation sizeScott Shawcroft
2019-02-03Add fast seek support to file objectsScott Shawcroft
2019-01-18More make_new updatesScott Shawcroft
2019-01-18Fix unix buildScott Shawcroft
2019-01-18More make_new fixes for unix buildScott Shawcroft
2019-01-14fixup micropyScott Shawcroft
2019-01-14py changes for supporting superclass constructors that take kwargsScott Shawcroft
2018-09-09uzlib: Upgrade to uzlib v2.9 releaseJeff Epler
This fixes a large number of crashes on malformed inputs.
2018-08-25Fix os.stat() to use 1970 epochNoralf Trønnes
Commit 95e70cd0ea6d 'time: Use 1970 epoch' changed epoch for the time module, but not for other users. This patch does the same for the only other core timeutils user: extmod/vfs_fat.c:fat_vfs_stat(). Other timeutils users: cc3200, esp8266 and stm32, are not changed. Ports that don't use long ints, will still get wrong time values from os.stat().
2018-08-16Fix unix coverage and update translations.Scott Shawcroft
2018-08-16Fix esp and samdScott Shawcroft
2018-08-16Compress all translated strings with Huffman coding.Scott Shawcroft
This saves code space in builds which use link-time optimization. The optimization drops the untranslated strings and replaces them with a compressed_string_t struct. It can then be decompressed to a c string. Builds without LTO work as well but include both untranslated strings and compressed strings. This work could be expanded to include QSTRs and loaded strings if a compress method is added to C. Its tracked in #531.
2018-08-09Two fixes and translate more strings.Scott Shawcroft
* Fix finding translations with escaped characters. * Add back \r to translations since its needed by screen.
2018-07-28merge finishedDan Halbert
2018-07-23WIP: complete manual inspection of all significant changesDan Halbert