Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Allow +, in, and compare ops between bytes and bytearray/array. | Damien George | 2014-11-05 |
| | | | | | | Eg b"123" + bytearray(2) now works. This patch actually decreases code size while adding functionality: 32-bit unix down by 128 bytes, stmhal down by 84 bytes. | ||
* | py: Fix builtin callable so it checks user-defined instances correctly. | Damien George | 2014-11-03 |
| | | | | Addresses issue #953. | ||
* | py: Fix bug with right-shifting small ints by large amounts. | Paul Sokolovsky | 2014-11-02 |
| | | | | Undefined behavior in C, needs explicit check. | ||
* | tests: Add heapalloc.py.exp, since CPython can't generate it. | Damien George | 2014-10-31 |
| | |||
* | py: Make gc.enable/disable just control auto-GC; alloc is still allowed. | Damien George | 2014-10-31 |
| | | | | | | gc.enable/disable are now the same as CPython: they just control whether automatic garbage collection is enabled or not. If disabled, you can still allocate heap memory, and initiate a manual collection. | ||
* | py: Add builtin round function. | Damien George | 2014-10-31 |
| | | | | Addresses issue #934. | ||
* | stmhal: Improve CAN print function. | Damien George | 2014-10-30 |
| | |||
* | tests: Added and adapted CAN tests for extended messages | Henrik Sölver | 2014-10-30 |
| | |||
* | objstr: Allow to convert any buffer proto object to str. | Paul Sokolovsky | 2014-10-31 |
| | | | | | Original motivation is to support converting bytearrays, but easier to just support buffer protocol at all. | ||
* | moductypes: Add test for accessing UINT8 array. | Paul Sokolovsky | 2014-10-30 |
| | |||
* | moductypes: Make sure we can apply .sizeof() to all aggregate types. | Paul Sokolovsky | 2014-10-30 |
| | | | | | | | | | | | | Before, sizeof() could be applied to a structure field only if that field was itself a structure. Now it can be applied to PTR and ARRAY fields too. It's not possible to apply it to scalar fields though, because as soon as scalar field (int or float) is dereferenced, its value is converted into Python int/float value, and all original type info is lost. Moreover, we allow sizeof of type definitions too, and there int is used to represent (scalar) types. So, we have ambiguity what int may be - either dereferenced scalar structure field, or encoded scalar type. So, rather throw an error if user tries to apply sizeof() to int. | ||
* | tests: Get builtin_compile to skin properly on pyboard. | Damien George | 2014-10-26 |
| | |||
* | stmhal: Change SPI phase spec to 0,1 to match standard conventions. | Damien George | 2014-10-26 |
| | | | | | | | Was 1 or 2, now 0 or 1 (respectively). 0 means sample MISO on first edge, 1 means sample on second edge. Addresses issue #936. | ||
* | py: Fix memoryview referencing so it retains ptr to original buffer. | Damien George | 2014-10-26 |
| | | | | | This way, if original parent object is GC'd, the memoryview still points to the underlying buffer data so that buffer is not GC'd. | ||
* | tests: Add test for compile builtin. | Damien George | 2014-10-25 |
| | |||
* | stream: Add optional 2nd "length" arg to .readinto() - extension to CPython. | Paul Sokolovsky | 2014-10-23 |
| | | | | | While extension to file.readinto() definition of CPython, the additional arg is similar to what in CPython available in socket.recv_into(). | ||
* | py: Add builtin memoryview object (mostly using array code). | Damien George | 2014-10-23 |
| | |||
* | extmod: Add uheapq module. | Damien George | 2014-10-22 |
| | |||
* | py: Fix smallint modulo with negative arguments. | Damien George | 2014-10-22 |
| | | | | Addresses issue #927. | ||
* | py: Remove unused and unneeded SystemError exception. | Damien George | 2014-10-22 |
| | | | | | It's purpose is for internal errors that are not catastrophic (ie not as bad as RuntimeError). Since we don't use it, we don't need it. | ||
* | stmhal: Overhaul UART class to use read/write, and improve it.v1.3.4 | Damien George | 2014-10-21 |
| | | | | | | | | | | | | UART object now uses a stream-like interface: read, readall, readline, readinto, readchar, write, writechar. Timeouts are configured when the UART object is initialised, using timeout and timeout_char keyword args. The object includes optional read buffering, using interrupts. You can set the buffer size dynamically using read_buf_len keyword arg. A size of 0 disables buffering. | ||
* | Use mode/encoding kwargs in io and unicode tests | stijn | 2014-10-21 |
| | | | | | | mode argument is used to assert it works encoding argument is used to make sure CPython uses the correct encoding as it does not automatically use utf-8 | ||
* | py: Partially fix viper multi-comparison; add test for it. | Damien George | 2014-10-19 |
| | |||
* | unix, stmhal: Implement file.readinto() method. | Paul Sokolovsky | 2014-10-18 |
| | | | | | | Also, usocket.readinto(). Known issue is that .readinto() should be available only for binary files, but micropython uses single method table for both binary and text files. | ||
* | modure: Update to re1.5 v0.6.1, fixed and extended character class support. | Paul Sokolovsky | 2014-10-17 |
| | |||
* | py: Add more compiler optimisations for constant if/while conditions. | Damien George | 2014-10-17 |
| | |||
* | tests: Add test for nested while with exc and break. | Damien George | 2014-10-17 |
| | |||
* | objclosure: Fix printing of generator closures. | Paul Sokolovsky | 2014-10-16 |
| | | | | The code previously assumed that only functions can be closed over. | ||
* | modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]). | Paul Sokolovsky | 2014-10-15 |
| | |||
* | Merge pull request #904 from pfalcon/moduzlib | Damien George | 2014-10-12 |
|\ | | | | | Module "uzlib" - based on similarly named library | ||
| * | moduzlib: Integrate into the system. | Paul Sokolovsky | 2014-10-13 |
| | | |||
* | | py: Implement native load for viper. | Damien George | 2014-10-12 |
|/ | | | | | Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using machine instructions. | ||
* | py: Implement and,or,xor native ops for viper. | Damien George | 2014-10-12 |
| | |||
* | modure: Basic tests. | Paul Sokolovsky | 2014-10-11 |
| | |||
* | tests: Skip ffi_float.py if module ffi is not available. | Paul Sokolovsky | 2014-10-06 |
| | |||
* | tests: Add missing "import sys". | Paul Sokolovsky | 2014-10-06 |
| | |||
* | tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh. | Damien George | 2014-10-06 |
| | |||
* | tests: Make run-tests-exp.sh skip tests that fail due to invalid decorator. | Damien George | 2014-10-06 |
| | | | | Should address issue #856. | ||
* | tests: Add check for micropython.native and then skip relevant tests. | Damien George | 2014-10-05 |
| | | | | | | | | | If micropython.native decorator doesn't compile, then we skill all native/viper tests. This patch also re-enables the ujson_loads test on NT. Addresses issue #861, and partially addresses issue #856. | ||
* | py: Make compiler return a proper exception on SyntaxError. | Damien George | 2014-10-05 |
| | |||
* | tests: Make printing of floats hopefully more portable. | Damien George | 2014-10-05 |
| | |||
* | Exclude some tests which always fail on windows | stijn | 2014-10-05 |
| | |||
* | tests: Add simple CAN test. | Damien George | 2014-10-02 |
| | |||
* | Enable device keyword option when running pyboard.py --tests and run-tests ↵ | blmorris | 2014-10-01 |
| | | | | --pyboard | ||
* | py: Remove IOError since it's deprecated; use OSError instead. | Damien George | 2014-09-30 |
| | | | | | | | | | | | In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background. | ||
* | py: Fix viper store on x86; add tests for viper ptr16. | Damien George | 2014-09-29 |
| | |||
* | py: Add casting to viper; add native mem stores to viper. | Damien George | 2014-09-29 |
| | | | | | | | | | | Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code. | ||
* | tests: Add tests for viper binary operations. | Damien George | 2014-09-29 |
| | |||
* | py: Allow viper to use ints as direct conditionals in jumps. | Damien George | 2014-09-29 |
| | | | | Allows things like: if 1: ... | ||
* | py: Simplify JSON str printing (while still conforming to JSON spec). | Damien George | 2014-09-25 |
| | | | | | The JSON specs are relatively flexible and allow us to use one function to print strings, be they ascii, bytes or utf-8 encoded. |