aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-12extmod/moduhashlib: Enable SHA1 hashing when using "mbedtls" library.Christopher Cooper
The SHA1 hashing functionality is provided via the "axtls" library's implementation, and hence is unavailable when the "axtls" library is not being used. This change provides the same SHA1 hashing functionality when using the "mbedtls" library by using its implementation instead.
2017-11-12esp8266/README: Add section on using upip.Paul Sokolovsky
2017-11-12esp8266/README: Emphasize the need to change default WiFi password.Paul Sokolovsky
2017-11-12py/objnamedtuple: Add _asdict function if OrderedDict is supportedstijn
2017-11-11py/objtype: mp_obj_new_type: Name base types related vars more clearly.Paul Sokolovsky
As vars contains array of base types and its length, name them as such, avoid generic "items" and "len" names.
2017-11-10docs/_thread: Add a placeholder docs for _thread module.Paul Sokolovsky
Doesn't list specific API calls yet, the purpose is to let user know that the module exists.
2017-11-08py/mpconfig: Introduce reusable MP_HTOBE32(), etc. macros.Paul Sokolovsky
Macros to convert big-endian values to host byte order and vice-versa. These were defined in adhoc way for some ports (e.g. esp8266), allow reuse, provide default implementations, while allow ports to override.
2017-11-08docs/ure: Emphasize not supported features more.Paul Sokolovsky
Plus, additional descriptions/formatting.
2017-11-07unix/moduselect: Fix nanbox build after adding .dump() method.Paul Sokolovsky
2017-11-07unix/moduselect: Add .dump() method for debugging.Paul Sokolovsky
Commented out by default.
2017-11-05axtls: Update, exposes AES functions to implement ECB chiper mode.Paul Sokolovsky
2017-11-05esp8266/etshal.h: Make function prototypes compatible with ESP SDK 2.1.0+.Paul Sokolovsky
In the vendor SDK 2.1.0, some of the functions which previously didn't have prototypes, finally acquired them. Change prototypes on our side to match those in vendor headers, to avoid warnings-as-errors.
2017-11-04docs/ure: Add flags arg to ure.compile(), mention that ure.DEBUG is optional.Paul Sokolovsky
2017-11-02docs/esp8266/general: Minor grammar fixes.Paul Sokolovsky
2017-11-02extmod/modussl_axtls: Typo fix in comment.Paul Sokolovsky
2017-11-02extmod/modussl_axtls: socket_read: Handle EAGAIN.Paul Sokolovsky
If SSL_EAGAIN is returned (which is a feature of MicroPython's axTLS fork), return EAGAIN. Original axTLS returns SSL_OK both when there's no data to return to user yet and when the underlying stream returns EAGAIN. That's not distinctive enough, for example, original module code works well for blocking stream, but will infinite-loop for non-blocking socket with EAGAIN. But if we fix non-blocking case, blocking calls to .read() will return few None's initially (while axTLS progresses thru handshake). Using SSL_EAGAIN allows to fix non-blocking case without regressing the blocking one. Note that this only handles case of non-blocking reads of application data. Initial handshake and writes still don't support non-blocking mode and must be done in the blocking way.
2017-11-01zephyr/README: "make qemu" was replaced with "make run".Paul Sokolovsky
2017-11-01docs/esp8266/general: TLS limitations: Mention also "ussl" module limitations.Paul Sokolovsky
2017-11-01py/compile: Use alloca instead of qstr_build when compiling import name.Damien George
The technique of using alloca is how dotted import names are composed in mp_import_from and mp_builtin___import__, so use the same technique in the compiler. This puts less pressure on the heap (only the stack is used if the qstr already exists, and if it doesn't exist then the standard qstr block memory is used for the new qstr rather than a separate chunk of the heap) and reduces overall code size.
2017-11-01docs: Bump version to 1.9.3.Damien George
2017-11-01teensy: Get port compiling without any warnings.Damien George
2017-10-31docs/ure: Add "|" (alternative) to the list of supported operators.Paul Sokolovsky
2017-10-31Revert "py/{mkenv.mk,mkrules.mk}: Append .exe for Windows executable files."Damien George
This reverts commit 3289b9b7a76a1230b6bb631e191a47bfc6c7a8ee. The commit broke building on MINGW because the filename became micropython.exe.exe. A proper solution to support more Windows build environments requires more thought and testing.
2017-10-31docs/usocket: Document that settimeout() isn't supported by all ports.Paul Sokolovsky
And describe an alternative of using uselect.poll().
2017-10-30docs/esp8266/general: Add section on TLS limitations.Paul Sokolovsky
2017-10-30docs/ussl: Fix module name refs and use "MicroPython port" term.Paul Sokolovsky
2017-10-30extmod/modussl_mbedtls: Allow to compile with unix coverage build.Damien George
Fixes a few C warnings. No functional changes.
2017-10-30extmod/modussl: Add finaliser support for ussl objects.Eric Poulsen
Per the comment found here https://github.com/micropython/micropython-esp32/issues/209#issuecomment-339855157, this patch adds finaliser code to prevent memory leaks from ussl objects, which is especially useful when memory for a ussl context is allocated outside the uPy heap. This patch is in-line with the finaliser code found in many modsocket implementations for various ports. This feature is configured via MICROPY_PY_USSL_FINALISER and is disabled by default because there may be issues using it when the ussl state *is* allocated on the uPy heap, rather than externally.
2017-10-30docs/reference/isr_rules: Minor typo correction.Yuval Langer
2017-10-29lib/axtls: Update, support for SSL_EAGAIN return code.Paul Sokolovsky
A step towards implementing non-blocking stream support for SSL.
2017-10-28unix: Enable MICROPY_PY_REVERSE_SPECIAL_METHODS.Paul Sokolovsky
With inplace methods now disabled by default, it makes sense to enable reverse methods, as they allow for more useful features, e.g. allow for datetime module to implement both 2 * HOUR and HOUR * 2 (where HOUR is e.g. timedelta object).
2017-10-27py/objtype: Introduce MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS.Paul Sokolovsky
This allows to configure support for inplace special methods separately, similar to "normal" and reverse special methods. This is useful, because inplace methods are "the most optional" ones, for example, if inplace methods aren't defined, the operation will be executed using normal methods instead. As a caveat, __iadd__ and __isub__ are implemented even if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS isn't defined. This is similar to the state of affairs before binary operations refactor, and allows to run existing tests even if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS isn't defined.
2017-10-27py/objtype: Define all special methods if requested.Paul Sokolovsky
If MICROPY_PY_ALL_SPECIAL_METHODS is defined, actually define all special methods (still subject to gating by e.g. MICROPY_PY_REVERSE_SPECIAL_METHODS). This adds quite a number of qstr's, so should be used sparingly.
2017-10-27docs/library/network: Add dhcp_hostname parameterJoar Wandborg
I have not actually tested this, going by information available in https://forum.micropython.org/viewtopic.php?t=2584
2017-10-27extmod/vfs: Replace VLA in proxy func with small, static sized array.Damien George
VLAs can be expensive on stack usage due to stack alignment requirements, and also the fact that extra local variables are needed to track the dynamic size of the stack. So using fixed-size arrays when possible can help to reduce code size and stack usage. In this particular case, the maximum value of n_args in the VLA is 2 and so it's more efficient to just allocate this array with a fixed size. This reduces code size by around 30 bytes on Thumb2 and Xtensa archs. It also reduces total stack usage of the function: on Thumb2 the usage with VLA is between 40 and 48 bytes, which is reduced to 32; on Xtensa, VLA usage is between 64 and 80 bytes, reduced to 32; on x86-64 it's at least 88 bytes reduced to 80.
2017-10-27docs/usocket: Document inet_ntop(), inet_pton().Paul Sokolovsky
2017-10-26docs/usocket: Elaborate descriptions.Paul Sokolovsky
Use the "usocket" module name everywhere. Use "MicroPython port" terminology. Suggest to avoid using IPPROTO_* constants in socket() call.
2017-10-26tests/net_inet: Update tls test to work with CPython and incl new site.Damien George
CPython only supports the server_hostname keyword arg via the SSLContext object, so use that instead of the top-level ssl.wrap_socket. This allows the test to run on CPython the same as uPy. Also add the "Host:" header to correctly make a GET request (for URLs that are hosted on other servers). This is not strictly needed to test the SSL connection but helps to debug things when printing the response.
2017-10-26docs/uselect: Document one-shot polling mode.Paul Sokolovsky
2017-10-24unix/modusocket: Remove #if MICROPY_SOCKET_EXTRA code blocks.Paul Sokolovsky
These defined couple of functions added during initial experimentation, which aren't part of MicroPython API and no longer used or needed.
2017-10-24all: Use NULL instead of "" when calling mp_raise exception helpers.Damien George
This is the established way of doing it and reduces code size by a little bit.
2017-10-23unix: Rename modsocket.c to modusocket.c.Paul Sokolovsky
Unix naming is historical, before current conventions were established. All other ports however have it as "modusocket.c", so rename for consistency and to avoid confusion.
2017-10-21py/objtype: Fit qstrs for special methods in byte type.Paul Sokolovsky
Update makeqstrdata.py to sort strings starting with "__" to the beginning of qstr list, so they get low qstr id's, guaranteedly fitting in 8 bits. Then use this property to further compact op_id => qstr mapping arrays.
2017-10-19py/objtype: Use CPython compatible method name for sizeof.Paul Sokolovsky
Per https://docs.python.org/3/library/sys.html#sys.getsizeof: getsizeof() calls the object’s __sizeof__ method. Previously, "getsizeof" was used mostly to save on new qstr, as we don't really support calling this method on arbitrary objects (so it was used only for reporting). However, normalize it all now.
2017-10-19py/argcheck: Remove #if guard around terse error message helper func.Damien George
Not all compilers/analysers are smart enough to realise that this function is never called if MICROPY_ERROR_REPORTING is not TERSE, because the logic in the code uses if statements rather than #if to select whether to call this function or not (MSC in debug mode is an example of this, but there are others). So just unconditionally compile this helper function. The code-base anyway relies on the linker to remove unused functions.
2017-10-19stm32: Make uos.dupterm() conform to specs by using extmod version.Damien George
The legacy function pyb.repl_uart() is still provided and retains its original behaviour (it only accepts a UART object). uos.dupterm() will now accept any object with write/readinto methods. At the moment there is just 1 dupterm slot.
2017-10-19stm32/mphalport: Improve efficiency of mp_hal_stdout_tx_strn_cooked.Damien George
Also simplifies the code by removing the specialised (and inefficient) cooked functions from UART and USB_VCP.
2017-10-19extmod/uos_dupterm: Swallow any errors from dupterm closing the stream.Damien George
Without this the board will crash when deactivating a stream that doesn't have a close() method (eg UART) or that raises an exception within the method (eg user-defined function).
2017-10-19README: Add gcc and arm-none-eabi-newlib to list of required components.Damien George
gcc is required for mpy-cross, and arm-none-eabi-newlib for ports using arm-none-eabi-gcc.
2017-10-17stm32/modnwwiznet5k: Implement stream ioctl for the Wiznet driver.Damien George
Now supports polling for read and write ability.