Commit Graph

6126 Commits

Author SHA1 Message Date
Paul Sokolovsky df453f0652 unix: Time to build with --gc-sections.
This actually saves "only" 6K for x86_64 build, as we're still more or less
careful to #ifdef unneeded code. But relying on --gc-sections in a "lazy"
manner would allow to make #ifdef'ing less pervasive (not suggested right
away, but an option for the future).
2016-06-17 02:38:20 +03:00
Paul Sokolovsky 332545baa3 extmod/modbtree: items(): Implement "end key inclusive" flag. 2016-06-17 00:08:55 +03:00
Robert HH 23067a1422 esp8266: Use RTC to set date & time stamps for files.
The time stamp is taken from the RTC for all newly generated
or changed files. RTC must be maintained separately.
The dummy time stamp of Jan 1, 2000 is set in vfs.stat() for the
root directory, avoiding invalid time values.
2016-06-16 19:31:58 +03:00
Paul Sokolovsky d0416ff915 extmod/modbtree: Actually implement end key support for .items(). 2016-06-16 18:16:33 +03:00
Paul Sokolovsky 1babeb47a4 extmod/modbtree: Implement .items() iterator. 2016-06-16 17:31:24 +03:00
Paul Sokolovsky acaa30b604 unix: Deprecate support for GNU Readline (MICROPY_USE_READLINE=2).
MicroPython own readline implementation is superior now by providing
automatic indentation and completion (completion for GNU Readline was
never implemented). MICROPY_USE_READLINE=2 also wasn't build for a long
time and probably broken.

If GNU Readline is still beneficial for some cases, it can be achieved
with external wrappers like "rlwrap" (there will be the same level of
functionality, as again, there never was deep integration, like completion
support).
2016-06-16 03:28:58 +03:00
Paul Sokolovsky f469c76442 py: Rename __QSTR_EXTRACT flag to NO_QSTR.
It has more usages than just qstr extraction, for example, embedding (where
people don't care about efficient predefined qstrs).
2016-06-16 01:42:48 +03:00
Paul Sokolovsky b5190f1df3 unix/mpconfigport_minimal.h: Clearly mark where user-define config ends.
TODO: Do the same for other config files.
2016-06-16 01:20:32 +03:00
Paul Sokolovsky 230d5cda05 py/mkrules.mk: Define "lib" outside conditional block.
"lib" happened to be defined inside block conditional on $(PROG).
2016-06-16 01:11:24 +03:00
Paul Sokolovsky dcb904416a py/makeqstrdefs.py: Remove restriction that source path can't be absolute.
That's arbitrary restriction, in case of embedding, a source file path may
be absolute. For the purpose of filtering out system includes, checking
for ".c" suffix is enough.
2016-06-16 01:04:42 +03:00
Paul Sokolovsky cd796f85af unix: Unbreak "minimal" target by disabling FatFs.
Was broken since introduction of FatFs support.
2016-06-16 00:03:24 +03:00
Paul Sokolovsky d402bf299d lib/fatfs/option/ccsbcs: Follow uPy optional features model.
Don't error out when options is not what you support, just skip your code.
This allows to make FatFs support properly configurable.
2016-06-15 23:53:26 +03:00
Paul Sokolovsky 0f5bf1aafe py/mpconfig.h: MP_NOINLINE is universally useful, move from unix port. 2016-06-15 23:52:00 +03:00
Paul Sokolovsky 422396cece extmod/modbtree: Handle default value and error check. 2016-06-15 04:18:44 +03:00
Paul Sokolovsky a1eab98eaf lib/berkeley-db-1.xx: Update to upstream which builds for uPy.
Applied "official" patches and fixed various warnings when built with uPy's
compile options.
2016-06-15 04:09:29 +03:00
Paul Sokolovsky 337111ba9e py: Support to build berkeley db 1.85 and "btree" module. 2016-06-15 00:52:45 +03:00
Paul Sokolovsky 06b783cf58 lib/berkeley-db-1.xx: Add Berkeley DB 1.85 as a submodule.
From https://github.com/pfalcon/berkeley-db-1.xx, which so far contains
pristine 1.85, but will get patches and compile warning fixes going
forward.

Berkeley DB 1.xx is BSD-licensed, and will form the basis of "btree"
simple database module.
2016-06-14 22:20:18 +03:00
Paul Sokolovsky 8072162170 extmod/modbtree: Initial implementation of "btree" module based on BerkeleyDB.
This implements basic wrapping of native get/put/seq API, and then dictionary
access protocol. Native API is intended to be superceded going forward.
2016-06-14 21:51:59 +03:00
Paul Sokolovsky 51805e4a3a docs: Rebuild docs from scratch, as required for proper only:: handling.
Docs are now by default rebuilt from scratch, as required to build
conditionalized (i.e. using only:: directive) docs across different
output types. We have pretty small docset, so that's still rather fast.
However, if that's a concern, incremental rebuilds can be used by
passing "FORCE=" (nothing after =) as a make parameter. This will work
when using the same output type (e.g. only "html").
2016-06-14 00:23:33 +03:00
Paul Sokolovsky 236838a9fc esp8266/Makefile: Enable --verify option for esptool.py write_flash.
Based on my experience, there's rather non-zero chance to have an image be
flashed incorrectly. As --verify option is now works well in teh latest
esptool.py, enable it by default.
2016-06-12 18:50:24 +03:00
Paul Sokolovsky 9f8b788fe5 esp8266: Switch floating-point arith routines to BootROM. 2016-06-12 18:44:14 +03:00
Mark Anthony Palomer deaf0712aa tests: Add testcase for OrderedDict equality.
There's a need for .exp file because CPython renders OrderedDict's as:

OrderedDict([('b', 2)])

while MicroPython as:

OrderedDict({'b': 2})
2016-06-12 17:37:19 +03:00
Mark Anthony Palomer 3131053e1a py/objdict: Implemented OrderedDict equality check. 2016-06-12 17:33:48 +03:00
Paul Sokolovsky 91031b60dc docs/conf.py: Active sphinx_selective_exclude extensions.
For modindex_exclude extension, per-port module excludes are also added.
With these changes, it's possible to generate docs for a particular port
devoid of any superfluous and unrelated content, including in indexes and
full-text search - with small caveat: when generating PDF docs after HTML,
or vice-versa cached internal doctree representation (build/*/doctrees/)
must be removed first.
2016-06-12 01:18:13 +03:00
Paul Sokolovsky f6d01b8b67 docs: Add sphinx_selective_exclude extension suite.
Designed specifically to workaround issues we were facing with generating
multiple conditionalized output docsets from a single master doctree.
Extensions were factored out into a separate project, based on the fact
that many other Sphinx users experience similar or related problems:
https://github.com/pfalcon/sphinx_selective_exclude

Corresponds to the 182f4a8da57 upstream revision.
2016-06-12 01:13:39 +03:00
Paul Sokolovsky 9de5eb278d docs/sys: Detailed description of print_exception() diff from traceback module. 2016-06-10 23:06:56 +03:00
Paul Sokolovsky 343b5c1081 docs/uctypes: Improve documentation.
Seealso and Limitations sectiosn added, better formatting and grammar.
2016-06-09 05:02:55 +03:00
Paul Sokolovsky 79b40d1127 docs/machine*: Remove explicit targets and "machine." prefixes on classes.
With currentmodule:: set properly, none are needed. Extra "machine." prefix
produces wrong indexing data.
2016-06-09 03:03:53 +03:00
Paul Sokolovsky a0c296f6d5 docs/machine.Pin: Disambiguate object call method. 2016-06-09 02:58:15 +03:00
Paul Sokolovsky 1d3b903eb5 docs/library/index: Add builtins.rst. 2016-06-09 00:26:44 +03:00
Paul Sokolovsky 0cec4e9bb8 docs/builtins: Enumerate all builtin functions implemented.
Based on unix version. No descriptions so far.
2016-06-09 00:24:52 +03:00
Paul Sokolovsky f1eb672d88 docs/pyb.Pin: Sort .af() and .af_list() methods together. 2016-06-08 16:36:22 +03:00
Paul Sokolovsky a384a53130 docs/pyb.*: Use proper class case in method headers.
Class designator will be used as is in indexes, so must match actual class
name.
2016-06-08 16:21:28 +03:00
Paul Sokolovsky 585aafc27e docs/pyb.ExtInt,pyb.Pin: Mark up class methods as such. 2016-06-08 16:00:12 +03:00
Paul Sokolovsky 0d8c22b122 docs/pyb.Pin: af_list() is a normal method, not a class method. 2016-06-08 15:57:46 +03:00
Paul Sokolovsky 8171995ee9 docs/pyb.CAN: Mark CAN.initfilterbanks() as classmethod explicitly. 2016-06-08 15:49:30 +03:00
Paul Sokolovsky e918fc5e37 tests/bench: Add testcase to compare bytes(N) vs b"\0" * N.
Based on python-dev discussion regarding PEP467.
2016-06-08 14:28:18 +03:00
Paul Sokolovsky bba77a2d01 docs/machine.Pin: Add class designator to all constants.
This makes rendered docs to not provide incorrect information and
consistent with how it's down for other machine classes.
2016-06-08 01:37:03 +03:00
Paul Sokolovsky 7d7243f44c docs/machine.*: Use proper class case in method headers.
Class designator will be used as is in indexes, so must match actual class
name.
2016-06-08 01:33:49 +03:00
Paul Sokolovsky 93968bd6fb docs/machine.UART: Cleanup pyboard section. 2016-06-08 01:32:16 +03:00
Paul Sokolovsky 0a4361ca67 docs/machine.Pin: Remove explicit target.
With currentmodule:: support, all targets should be generated properly by
Sphinx.
2016-06-08 01:13:59 +03:00
Paul Sokolovsky 0a4cc24b2e docs/pyb.*: Add "currentmodule:: pyb" directive.
Makes sure that classes described in these separate files are properly
designated as belonging to "pyb" module in indexes.
2016-06-08 00:57:41 +03:00
Paul Sokolovsky c8b7628094 docs/machine.*: Add "currentmodule:: machine" directive.
Makes sure that classes described in these separate files are properly
designated as belonging to "machine" module in indexes.
2016-06-08 00:46:27 +03:00
Paul Sokolovsky 2c5fc681c8 docs/library/machine.Pin: Mention GPIO and cross-link .value() function. 2016-06-07 17:49:00 +03:00
Paul Sokolovsky 6e2fa5237d docs/usocket: There must be empty line after .only:: . 2016-06-07 17:41:21 +03:00
Paul Sokolovsky 9b18811951 docs/ure: Typo fix. 2016-06-07 08:53:54 +03:00
Paul Sokolovsky 753a965363 docs/esp.socket: Remove unused file. 2016-06-07 02:40:05 +03:00
Paul Sokolovsky 9487b80666 docs/library/network: wipy: Fix literal block indentation. 2016-06-07 02:07:08 +03:00
Damien George b1533c4366 py/parse: Treat constants that start with underscore as private.
Assignments of the form "_id = const(value)" are treated as private
(following a similar CPython convention) and code is no longer emitted
for the assignment to a global variable.

See issue #2111.
2016-06-06 17:28:32 +01:00
Damien George 2bf6eb9fe2 docs: Add link to PDF version of docs in sidebar.
Requires a link of the form: <BASEURL>/<lang>/<ver>/micropython-<port>.pdf
2016-06-06 11:37:40 +01:00