summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-10docs/library/uos: Add description of uos.ilistdir() function.Damien George
2017-05-10extmod/vfs: Use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers.Damien George
2017-05-10ports: Add ilistdir in uos module.Damien George
2017-05-10tests/extmod/vfs: Update tests to reflect new ilistdir() method.Damien George
2017-05-10extmod/vfs_fat: Replace listdir() with implementation of ilistdir().Damien George
VfsFat no longer has the listdir() method. Rather, if listdir() functionality is needed then one should use uos.listdir() which will call VfsFat.ilistdir().
2017-05-10extmod/vfs: Implement mp_vfs_ilistdir().Damien George
uos.ilistdir() is the core function, returning an iterator that yields 3-tuples. uos.listdir() is implemented in terms of ilistdir().
2017-05-09unix/main: Implement -m option for packages.Paul Sokolovsky
2017-05-09tests/extmod: Make some vfs tests fully unmount FSs before running.Damien George
Otherwise the existing FSs can interfere with the tests, and in some cases the tests can write to the real FS on the device.
2017-05-09tests/basics/lexer: Add lexer tests for input starting with newlines.Tom Collins
2017-05-09py/lexer: Simplify lexer startup by using dummy bytes and next_char().Tom Collins
Now consistently uses the EOL processing ("\r" and "\r\n" convert to "\n") and EOF processing (ensure "\n" before EOF) provided by next_char(). In particular the lexer can now correctly handle input that starts with CR.
2017-05-09tests/basics: Add memoryview test for big ints.Damien George
2017-05-09tests/basics: Update array test for big-int with lL typecodes.Damien George
2017-05-09py/binary: Handle storing big-ints to all arrays types.Damien George
Prior to this patch only 'q' and 'Q' type arrays could store big-int values. With this patch any big int that is stored to an array is handled by the big-int implementation, regardless of the typecode of the array. This allows arrays to work with all type sizes on all architectures.
2017-05-06py/modio: resource_stream: Implement "package" param handling.Paul Sokolovsky
2017-05-06unix/main: Don't allow to specify too small heap size.Paul Sokolovsky
This will lead to crash like: FATAL: uncaught NLR 80a5420 On x86_32, the minimum heap size is smaller, but not 2 times, so just use value which works for x86_64.
2017-05-06stmhal: Convert all module and method tables to use MP_ROM macros.Damien George
2017-05-06tests: Move super-as-local test from cpydiff to basic tests.Damien George
It's now possible to use the name "super" as a local variable.
2017-05-06tests/micropython: Add test for int.from_bytes with many zero bytes.Damien George
2017-05-06py/objint: In int.from_bytes, only create big-int if really needed.Damien George
This patch ensures that int.from_bytes only creates a big-int if necessary, by checking the value for a small-int overflow as it's being parsed.
2017-05-05lib/utils/pyexec: Update event-driven REPL to match non-event REPL.Tom Collins
Don't print dupe ">>> " prompt when starting event-driven REPL. Clear incomplete line in transition from raw to friendly REPL.
2017-05-05esp8266: Change default settings to mount flash at root dir.Damien George
2017-05-05tests/extmod: Add some more VFS tests.Damien George
2017-05-05tests/extmod: Add more tests for VFS FAT.Damien George
2017-05-05extmod/vfs: Allow a VFS to be mounted at the root dir.Damien George
This patch allows mounting of VFS objects right at the root directory, eg os.mount(vfs, '/'). It still allows VFS's to be mounted at a path within the root, eg os.mount(vfs, '/flash'), and such mount points will override any paths within a VFS that is mounted at the root.
2017-05-05tools/upip: Upgrade to 1.2.Paul Sokolovsky
Memory optimizations and error handling improvements.
2017-05-04tests/cpydiff/core_function_unpacking: Fill in workaround.Paul Sokolovsky
2017-05-03tests/cpydiff/core_import_split_ns_pkgs: Test for split namespace packages.Paul Sokolovsky
2017-05-03tests/cpydiff/core_import_path: Test showing difference in package.__path__.Paul Sokolovsky
2017-05-03msvc: Workaround parser bug in older MSBuild versionsstijn
Versions prior to v14.0 have a bug in parsing item functions when used within a condition: https://github.com/Microsoft/msbuild/issues/368. Since commit [db9c2e3] this results in an error when building MicroPython with for example VS2013. Fix this by creating an intermediate property.
2017-05-03mpy-cross: Fix compiler detection for including windows/fmode.cstijn
fmode.c should only be included for builds targetting 'pure' windows, i.e. msvc or mingw builds but not when using msys or cygwin's gcc (see #2298). Just checking if the OS is windows and UNAME doesn't have msys stil leaves the gate open for builds with cygwin's gcc since UNAME there is e.g. CYGWIN_NT-6.1-WOW. Fix this by checking for 'mingw' explicitly in the compiler version; both gcc and clang have the -dumpmachine flag so the check should be ok for all platforms.
2017-05-03tests/io/resource_stream: Add test for uio.resource_stream().Paul Sokolovsky
2017-05-03py/modio: Implement uio.resource_stream(package, resource_path).Paul Sokolovsky
The with semantics of this function is close to pkg_resources.resource_stream() function from setuptools, which is the canonical way to access non-source files belonging to a package (resources), regardless of what medium the package uses (e.g. individual source files vs zip archive). In the case of MicroPython, this function allows to access resources which are frozen into the executable, besides accessing resources in the file system. This is initial stage of the implementation, which actually doesn't implement "package" part of the semantics, just accesses frozen resources from "root", or filesystem resource - from current dir.
2017-05-02zephyr/main: Remove superfluous include.Paul Sokolovsky
2017-05-02zephyr/mpconfigport.h: Enable line number information for scripts.Paul Sokolovsky
2017-05-02tests/cpydiff/core_import_prereg: Fill in cause and workaround.Paul Sokolovsky
2017-05-02tests/cpydiff/core_function_userattr: Clarify, fill in cause and workaround.Paul Sokolovsky
2017-05-02tests/cpydiff/core_arguments: Fill in cause/workaround.Paul Sokolovsky
2017-05-02zephyr/Makefile: Add debugserver Zephyr target.Paul Sokolovsky
2017-05-01unix/main: Ignore SIGPIPE signal, instead make EPIPE arrive.Paul Sokolovsky
Do not raise SIGPIPE, instead return EPIPE. Otherwise, e.g. writing to peer-closed socket will lead to sudden termination of MicroPython process. SIGPIPE is particularly nasty, because unix shell doesn't print anything for it, so the above looks like completely sudden and silent termination for unknown reason. Ignoring SIGPIPE is also what CPython does. Note that this may lead to problems using MicroPython scripts as pipe filters, but again, that's what CPython does. So, scripts which want to follow unix shell pipe semantics (where SIGPIPE means "pipe was requested to terminate, it's not an error"), should catch EPIPE themselves.
2017-05-01extmod/modlwip: ioctl POLL: Fix handling of peer closed socket.Paul Sokolovsky
Peer-closed socket is both readable and writable: read will return EOF, write - error. Without this poll will hang on such socket. Note that we don't return POLLHUP, based on argumentation in http://www.greenend.org.uk/rjk/tech/poll.html that it should apply to deeper disconnects, for example for networking, that would be link layer disconnect (e.g. WiFi went down).
2017-05-01windows/README: Add a note about stack usage for msvcstijn
Add information as discussed in #2927 to the readme to make the easier to discover.
2017-05-01windows/README: Fix some typos and grammarstijn
2017-05-01tools/upip: Upgrade to 1.1.6, supports commented lines in requirements.txt.Paul Sokolovsky
2017-05-01tools/mpy-tool: Make work if run from another directory.Paul Sokolovsky
By making sure we don't add relative paths to sys.path.
2017-04-30msvc: Rebuild all qstrs when mpconfig headers are modifiedstijn
Make qstr generation depend on modifications in mpconfigport.h, mpconfig.h and makeqstrdata.py and if any of those change scan all source files for qstrs again since they might have changed (for example typcially when enabling new features in mpconfig.h). This fixes #2982 for msvc builds.
2017-04-30msvc: Do not define DEBUG for debug buildsstijn
It is not used anywhere and causes a warning about redefinition because it is used in modutimeq.c
2017-04-30py: Cleanup use of global DEBUG preprocessor definitionstijn
The standard preprocessor definition to differentiate debug and non-debug builds is NDEBUG, not DEBUG, so don't rely on the latter: - just delete the use of it in objint_longlong.c as it has been stale code for years anyway (since commit [c4029e5]): SUFFIX isn't used anywhere. - replace DEBUG with MICROPY_DEBUG_NLR in nlr.h: it is rarely used anymore so can be off by default
2017-04-30windows/README: Convert to Markdown.Paul Sokolovsky
2017-04-29extmod/modlwip: getaddrinfo: Allow to accept all 6 standard params.Paul Sokolovsky
But warn if anything else but host/port is passed.
2017-04-29extmod/moduselect: Implement ipoll() method for alloc-free polling.Paul Sokolovsky
Similar to the implementation added to unix port module previously.