1. 03 Oct, 2017 6 commits
    • chrismas9's avatar
      py/{mkenv.mk,mkrules.mk}: Append .exe for Windows executable files. · 3289b9b7
      chrismas9 authored
      Building mpy-cross: this patch adds .exe to the PROG name when building
      executables for host (eg mpy-cross) on Windows.  make clean now removes
      mpy-cross.exe under Windows.
      
      Building MicroPython: this patch sets MPY_CROSS to mpy-cross.exe or
      mpy-cross so they can coexist and use cygwin or WSL without rebuilding
      mpy-cross.  The dependency in the mpy rule now uses mpy-cross.exe for
      Windows and mpy-cross for Linux.
      3289b9b7
    • Damien George's avatar
      esp8266/esp_mphal: Send data in chunks to mp_uos_dupterm_tx_strn. · b00040c4
      Damien George authored
      Sending byte-by-byte is inefficient and leads to errors in the WebSocket
      protocol when sending utf-8 encoded characters.
      b00040c4
    • Damien George's avatar
    • Damien George's avatar
    • Damien George's avatar
      py/objset: Check that RHS of a binary op is a set/frozenset. · 2ac13646
      Damien George authored
      CPython docs explicitly state that the RHS of a set/frozenset binary op
      must be a set to prevent user errors.  It also preserves commutativity of
      the ops, eg: "abc" & set() is a TypeError, and so should be set() & "abc".
      
      This change actually decreases unix (x64) code by 160 bytes; it increases
      stm32 by 4 bytes and esp8266 by 28 bytes (but previous patch already
      introduced a much large saving).
      2ac13646
    • Damien George's avatar
      py/objset: Simplify set and frozenset by separating their locals dicts. · 01978648
      Damien George authored
      A lot of set's methods (the mutable ones) are not allowed to operate on a
      frozenset, and giving frozenset a separate locals dict with only the
      methods that it supports allows to simplify the logic that verifies if
      args are a set or a frozenset.  Even though the new frozenset locals dict
      is relatively large (88 bytes on 32-bit archs) there is a much bigger
      saving coming from the removal of a const string for an error message,
      along with the removal of some checks for set or frozenset type.
      
      Changes in code size due to this patch are (for ports that changed at all):
      
         unix x64:   -56
      unix nanbox:  -304
            stm32:   -64
          esp8266:  -124
           cc3200:   -40
      
      Apart from the reduced code, frozenset now has better tab-completion
      because it only lists the valid methods.  And the error message for
      accessing an invalid method is now more detailed (it includes the
      method name that wasn't found).
      01978648
  2. 02 Oct, 2017 3 commits
  3. 30 Sep, 2017 1 commit
  4. 26 Sep, 2017 2 commits
    • Damien George's avatar
      py/objfloat: Support raising a negative number to a fractional power. · bdc6e86e
      Damien George authored
      This returns a complex number, following CPython behaviour.  For ports that
      don't have complex numbers enabled this will raise a ValueError which gives
      a fail-safe for scripts that were written assuming complex numbers exist.
      bdc6e86e
    • David Lechner's avatar
      py: Add config option to print warnings/errors to stderr. · 62849b70
      David Lechner authored
      This adds a new configuration option to print runtime warnings and errors to
      stderr. On Unix, CPython prints warnings and unhandled exceptions to stderr,
      so the unix port here is configured to use this option.
      
      The unix port already printed unhandled exceptions on the main thread to
      stderr. This patch fixes unhandled exceptions on other threads and warnings
      (issue #2838) not printing on stderr.
      
      Additionally, a couple tests needed to be fixed to handle this new behavior.
      This is done by also capturing stderr when running tests.
      62849b70
  5. 25 Sep, 2017 4 commits
  6. 24 Sep, 2017 1 commit
    • Paul Sokolovsky's avatar
      extmod/re1.5: Update to 0.8.1. · 4a314a6f
      Paul Sokolovsky authored
      Allow literal minus in char classes to be in trailing position, e.g. [a-c-].
      (Previously, minus was allowed only at the start.)
      
      This increases ARM Thumb2 code size by 8 bytes.
      4a314a6f
  7. 22 Sep, 2017 5 commits
  8. 21 Sep, 2017 11 commits
  9. 20 Sep, 2017 2 commits
  10. 19 Sep, 2017 1 commit
  11. 18 Sep, 2017 2 commits
  12. 17 Sep, 2017 2 commits