Tony Abboud
8d8fdcb4be
stmhal: add option to query for the current usb mode
...
Fetch the current usb mode and return a string representation when
pyb.usb_mode() is called with no args. The possible string values are interned
as qstr's. None will be returned if an incorrect mode is set.
2015-09-03 23:30:43 +01:00
Damien George
821b7f22fe
py: Use mp_not_implemented consistently for not implemented features.
2015-09-03 23:14:06 +01:00
Damien George
25afc7da0d
tests: Add tests to improve coverage of objstr.c.
2015-09-03 23:06:18 +01:00
Damien George
e2aa117798
py/objstr: Simplify printing of bytes objects when unicode enabled.
2015-09-03 23:03:57 +01:00
Damien George
516982242d
py: Inline single use of mp_obj_str_get_len in mp_obj_len_maybe.
...
Gets rid of redundant double check for string type.
Also remove obsolete declaration of mp_obj_str_get_hash.
2015-09-03 23:01:07 +01:00
Paul Sokolovsky
8bf00084b6
py: Make "enumerate" qstr be conditional on MICROPY_PY_BUILTINS_ENUMERATE.
2015-09-03 19:35:52 +03:00
Damien George
81794fcd31
py/binary: Add support for array('q') and array('Q').
2015-09-01 16:31:48 +01:00
Damien George
22602cc37b
py/objstr: Make str.rsplit(None,n) raise NotImpl instead of assert(0).
2015-09-01 15:35:31 +01:00
Paul Sokolovsky
1b693543aa
tests: Skip exception_chain.py with native emitter.
2015-09-01 11:53:27 +03:00
Paul Sokolovsky
ab2594e341
tests: Add test for exception-chaining raise syntax.
2015-09-01 10:39:11 +03:00
Paul Sokolovsky
2ff2ea5f3b
vm: Handle "raise X from Y" statements the best way we can.
...
By issuing a warning that exception chaining is not supported, and ignoring
"from Y" argument.
2015-09-01 10:39:04 +03:00
Paul Sokolovsky
21ffa7c4ba
modbuiltins: Consistently use indentation for #if.
2015-08-31 00:22:11 +03:00
Paul Sokolovsky
696eee9475
modffi: dlsym() doesn't set errno, so use ENOENT for OSError.
...
This may be a bit confusing, as ENOENT is often rendered as "No such
file or directory", but any other code would be only more confusing.
2015-08-31 00:20:08 +03:00
Paul Sokolovsky
a9058bf294
unix: Allow to build libffi from source and link against it.
...
Linking against local libffi (and other libs in future) is triggered by
"make MICROPY_STANDALONE=1". Before that, dependent libs should be built
with "make deplibs".
2015-08-30 15:26:25 +03:00
Damien George
39c91d3624
tests: Fix non-compliant expected output to match actual behaviour.
2015-08-30 12:46:08 +01:00
Damien George
000730ecaa
py/objstr: Simplify error handling for bad conversion specifier.
2015-08-30 12:43:21 +01:00
Damien George
c9fa667252
tests: Add tests for non-compliant behaviour.
...
These tests are intended to improve coverage and provide a record of
behaviour that's either not implemented or non-compliant to CPython.
2015-08-30 12:32:26 +01:00
Damien George
c2ec2ad8fb
tests: Add test where __getitem__ raises IndexError to stop iteration.
2015-08-30 11:49:59 +01:00
Tom Soulanille
6433f71e8f
py/objgetitemiter: Make it_iternext() recognize IndexError.
2015-08-30 11:49:49 +01:00
Paul Sokolovsky
a3fe307400
tests: Consolidate all feature check snippets under feature_check/.
2015-08-30 11:36:42 +03:00
Paul Sokolovsky
1a1b48e51a
tests: Add feature_check dir to collect capability detection scripts.
...
Which are currently intermixed with real scripts and spread around various
dirs.
2015-08-30 11:11:18 +03:00
Paul Sokolovsky
e8ad47a6ca
tools: Upgrade to upip 0.5.7.
...
Just dependent micropython-lib modules update for upip, no new
functionality.
2015-08-30 11:04:38 +03:00
Damien George
b648e98ad0
py/objstr: Fix error reporting for unexpected end of modulo format str.
2015-08-29 23:13:51 +01:00
Damien George
7ef75f9f75
py/objstr: Fix error type for badly formatted format specifier.
...
Was KeyError, should be ValueError.
2015-08-29 23:13:51 +01:00
Damien George
51b9a0d0c4
py/objstr: Make string formatting 8-bit clean.
2015-08-29 23:13:51 +01:00