summaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
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
2018-07-13compiles and runs; hangs on import storage;storage.VfsFat.<tab>Dan Halbert
2018-07-12continued WIP: almost compilingDan Halbert
2018-07-11WIP: after merge; before testingDan Halbert
2018-06-21allow '/' to be mounted on '/' from Python codeDan Halbert
2018-06-18extmod: Update to use new mp_get_stream helper.Damien George
With this patch objects are only checked that they have the stream protocol at the start of their use as a stream, and afterwards the efficient mp_get_stream() helper is used to extract the stream protocol C methods.
2018-06-16extmod/vfs_fat_diskio: Factor disk ioctl code to reduce code size.Damien George
Functionality is unchanged.
2018-06-14Fix playing audio from SD cardDan Halbert
2018-06-13extmod/modussl_axtls: Fix __del__ to point to mp_stream_close_obj.Damien George
2018-06-12extmod/uos_dupterm: Use native C stream methods on dupterm object.Damien George
This patch changes dupterm to call the native C stream methods on the connected stream objects, instead of calling the Python readinto/write methods. This is much more efficient for native stream objects like UART and webrepl and doesn't require allocating a special dupterm array. This change is a minor breaking change from the user's perspective because dupterm no longer accepts pure user stream objects to duplicate on. But with the recent addition of uio.IOBase it is possible to still create such classes just by inheriting from uio.IOBase, for example: import uio, uos class MyStream(uio.IOBase): def write(self, buf): # existing write implementation def readinto(self, buf): # existing readinto implementation uos.dupterm(MyStream())
2018-06-12extmod/moduhashlib: Make function objects STATIC.Yonatan Goldschmidt
These are not exported to anyone anyway.
2018-06-12extmod/moduhashlib: Allow using the sha256 implementation of mbedTLS.Yonatan Goldschmidt
2018-06-12extmod/moduhashlib: Allow to disable the sha256 class.Yonatan Goldschmidt
Via the config value MICROPY_PY_UHASHLIB_SHA256. Default to enabled to keep backwards compatibility. Also add default value for the sha1 class, to at least document its existence.
2018-06-12extmod/moduhashlib: Reorder funcs so that they are grouped by hash type.Yonatan Goldschmidt
Makes the code much more readable by reducing the number of #ifdefs and keeping related functions close.
2018-06-12extmod/moduhashlib: Prefix all Python methods and objects with uhashlib.Yonatan Goldschmidt
For consistency with other modules, and to help avoid clashes with the actual underlying functions that do the hashing (eg crypto-algorithms/sha256.c:sha256_update).
2018-06-06extmod/vfs: Introduce a C-level VFS protocol, with fast import_stat.Damien George
Following other C-level protocols, this VFS protocol is added to help abstract away implementation details of the underlying VFS in an efficient way. As a starting point, the import_stat function is put into this protocol so that the VFS sub-system does not need to know about every VFS implementation in order to do an efficient stat for importing files. In the future it might be worth adding other functions to this protocol.
2018-06-06extmod/vfs: Add fast path for stating VfsPosix filesystem.Damien George
2018-06-06extmod: Add VfsPosix filesystem component.Damien George
This VFS component allows to mount a host POSIX filesystem within the uPy VFS sub-system. All traditional POSIX file access then goes through the VFS, allowing to sandbox a uPy process to a certain sub-dir of the host system, as well as mount other filesystem types alongside the host filesystem.
2018-06-06extmod/vfs_fat: Rename FileIO/TextIO types to mp_type_vfs_fat_XXX.Damien George
So they don't clash with other VFS implementations.
2018-06-06extmod/vfs: Use u_rom_obj properly in argument structures.Damien George
2018-05-31extmod/modussl_mbedtls: Use mbedtls_entropy_func for CTR-DRBG entropy.Damien George
If mbedtls_ctr_drbg_seed() is available in the mbedtls bulid then so should be mbedtls_entropy_func(). Then it's up to the port to configure a valid entropy source, eg via MBEDTLS_ENTROPY_HARDWARE_ALT.
2018-05-31extmod/modussl_mbedtls: Populate sock member right away in wrap_socket.Damien George
Otherwise the "sock" member may have an undefined value if wrap_socket fails with an exception and exits early, and then if the finaliser runs it will try to close an invalid stream object. Fixes issue #3828.
2018-05-21extmod/modlwip: Allow to compile with MICROPY_PY_LWIP disabled.Damien George
2018-05-17extmod/modlwip: Set POLLHUP flag for sockets that are new.Damien George
This matches CPython behaviour on Linux: a socket that is new and not listening or connected is considered "hung up". Thanks to @rkojedzinszky for the initial patch, PR #3457.
2018-05-17extmod/modlwip: Update to work with lwIP v2.0.Damien George
lwIP v2.0.3 has been tested with this lwip module and it works very well.
2018-05-08Merge pull request #817 from jepler/uzlib-as-submoduleScott Shawcroft
uzlib: convert to submodule
2018-05-07uzlib: convert to submoduleJeff Epler
Textualy, the files in lib/uzlib/src were identical to the ones committed in extmod/uzlib so there should be no behavioral change possible as a result of this commit.
2018-05-06uhashlib: masquerade as hashlib for python3 compatibilityJeff Epler
2018-05-06uhashlib: some functions should refuse unicode for python3 compatibilityJeff Epler
.. this maybe should be subject to MICROPY_CPYTHON_COMPAT, except that is not defined in the main circuitpython ports so it would be a change that makes no difference.