Commit Graph

8174 Commits (55f33240f3d7051d4213629e92437a36f1fac50e)

Author SHA1 Message Date
Paul Sokolovsky ef47dee4bf docs/conf.py: Add .venv dir to exclude_patterns.
It's useful to try different Sphinx versions using virtualenv/venv, so
exclude a common venv dir name from Sphinx processing.
2017-07-01 20:01:05 +03:00
Paul Sokolovsky e334b6b6d2 docs/constrained: Use markup adhering to the latest docs conventions. 2017-07-01 19:28:55 +03:00
Paul Sokolovsky 58b7b01cb5 extmod/modure: If input string is bytes, return bytes results too.
This applies to match.group() and split().

For ARM Thumb2, this increased code size by 12 bytes.
2017-07-01 01:25:45 +03:00
Paul Sokolovsky 871a45dd0c docs/{uselect,ussl,ustruct}: Use markup adhering to latest docs conventions. 2017-06-30 14:50:52 +03:00
Damien George f2babeaeda docs/topindex.html: Remove link to wipy.io, it's no longer available. 2017-06-30 18:57:26 +10:00
Damien George 369e7fd178 tests/unix/extra_coverage: Add test for mp_vprintf with bad fmt spec. 2017-06-30 12:25:42 +10:00
Damien George adf22c19ae py/mpprint: Remove unreachable check for neg return of mp_format_float. 2017-06-30 12:10:50 +10:00
Damien George 8f6ef8de48 tests/basics/namedtuple1: Add test for creating with pos and kw args. 2017-06-29 17:50:09 +10:00
Damien George 265500c5c8 py/objnamedtuple: Simplify and remove use of alloca building namedtuple.
Prior to this patch there were 2 paths for creating the namedtuple, one for
when no keyword args were passed, and one when there were keyword args.
And alloca was used in the keyword-arg path to temporarily create the array
of elements for the namedtuple, which would then be copied to a
heap-allocated object (the namedtuple itself).

This patch simplifies the code by combining the no-keyword and keyword
paths, and removing the need for the alloca by constructing the namedtuple
on the heap before populating it.

Heap usage in unchanged, stack usage is reduced, use of alloca is removed,
and code size is not increased and is actually reduced by between 20-30
bytes for most ports.
2017-06-29 17:40:25 +10:00
Paul Sokolovsky 1942f0ceef docs/{framebuf,usocket}: Use markup adhering to the latest docs conventions. 2017-06-29 02:22:14 +03:00
Damien George 346f5d4cce stmhal/mpconfigport.h: Allow MICROPY_PY_THREAD to be overridden. 2017-06-28 15:45:04 +10:00
Damien George 05a08506ae stmhal/Makefile: Add CFLAGS_EXTRA to CFLAGS so cmdline can add options. 2017-06-28 15:44:29 +10:00
Damien George 703370ebc5 stmhal/Makefile: Rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C name
The name used in py/mpconfig.h is MICROPY_FLOAT_IMPL so rename this
Makefile variable to mirror that.
2017-06-28 15:42:40 +10:00
Damien George 4d47e6c0db travis: Build STM32F769DISC board instead of F7DISC to test dbl-prec FP. 2017-06-28 15:12:05 +10:00
Damien George 535804a0ed stmhal/Makefile: Use hardware double-prec FP for MCUs that support it. 2017-06-28 15:12:05 +10:00
Damien George d20f8fb893 stmhal/boards: Enable double-prec FP on F76x boards. 2017-06-28 15:12:04 +10:00
Damien George ebfdd96cb2 stmhal: Add possibility to build with double-precision floating point.
By default the firmware is built with single-precision floating point.
To build a particular board using double precision instead, put the
following line in the mpconfigboard.mk file:

    FLOAT_IMPL = double
2017-06-28 15:12:04 +10:00
Damien George 045116551e lib: Add libm_dbl, a double-precision math library, from musl-1.1.16. 2017-06-28 15:12:04 +10:00
Damien George 409fc8f9c1 tests/import: Update comment now that uPy raises correct exception. 2017-06-28 12:21:29 +10:00
Damien George 3a9445c6b3 tests/import: Add a test for the builtin __import__ function. 2017-06-28 12:21:29 +10:00
Damien George 2f7fad66a2 py/builtinimport: Remove unreachable code for relative imports.
The while-loop that calls chop_component will guarantee that level==-1 at
the end of the loop.  Hence the code following it is unnecessary.

The check for p==this_name will catch imports that are beyond the
top-level, and also covers the case of new_mod_q==MP_QSTR_ (equivalent to
new_mod_l==0) so that check is removed.

There is also a new check at the start for level>=0 to guard against
__import__ being called with bad level values.
2017-06-28 12:21:29 +10:00
Alexander Steffen ebb9396274 esp8266,minimal,pic16bit: Use size_t for mp_builtin_open argument.
py/builtin.h declares mp_builtin_open with the first argument of type
size_t.  Make all implementations conform to this declaration.
2017-06-28 11:45:52 +10:00
Alexander Steffen cd0987f5b7 py/frozenmod.h: Add missing header guards 2017-06-28 00:51:45 +03:00
Paul Sokolovsky f8ac28964d docs/{micropython,sys,uos}: Use markup adhering to the latest docs conventions. 2017-06-28 00:37:47 +03:00
Benjamin Weps 3e82bedf46 stmhal/sdcard: Allow a board to customise the SDIO pins. 2017-06-27 12:42:46 +10:00
Paul Sokolovsky fbd252b77c docs/{esp,pyb,ubinascii}: Use markup adhering to the latest docs conventions. 2017-06-27 00:38:05 +03:00
Paul Sokolovsky 748f493f33 docs: Move all ports docs to the single ToC.
Previously, only "selected chapters" were shown in left-pane ToC (of
Read The Docs theme). These chapters were selected out of order. The
rest of chapters were hidden beyond "Documentation Contents" pseudo-
chapter. This arguably led only to confusion, as many people probably
never tried to open that pseudo-chapter, and those who did, were
confused. Such organization is even worse for PDF output, causing
chapters go in mix-mashed order.

So, instead move to single clean ToC. This will allow readers of HTML
to have access to any doc content at their fingertips (and straight
before their eyes), and will allow to finally have clean PDF docs.
2017-06-27 00:34:27 +03:00
Damien George 683df1c8d5 drivers/onewire: Enable pull-up when init'ing the 1-wire pin.
A previous version of the 1-wire driver (which was recently replaced by the
current one) had this behaviour and it allows to create a 1-wire bus
without any external pull-up resistors.
2017-06-26 17:48:05 +10:00
Damien George 118173013f stmhal/boards/stm32f405.ld: Increase FLASH_TEXT to end of 1MiB flash.
And and FLASH_FS, and use "K" values instead of hex numbers for lengths.

The increase of FLASH_TEXT is to allow more frozen bytecode for a
particular user's project.  It's not used for anything else.
2017-06-26 17:00:06 +10:00
Damien George 02e9337494 README: Improve description of precompiled bytecode; mention mpy-cross. 2017-06-26 15:33:43 +10:00
Damien George 7a4694fc4e docs/library/gc: Fix grammar and improve readability of gc.threshold(). 2017-06-26 15:25:51 +10:00
Damien George 0a54b6dce9 docs/esp8266/tutorial/intro: Fix some grammatical typos. 2017-06-26 15:12:48 +10:00
Damien George caa132a236 esp8266/machine_rtc: Use correct arithmetic for aligning RTC mem len. 2017-06-26 14:29:30 +10:00
Damien George 4a6c0fda78 tests: Auto detect floating point capabilites of the target.
The floating-point precision of the target is detected (0, 30, 32 or 64)
and only those tests which can run on the target will be run.
2017-06-26 13:47:00 +10:00
Damien George c408ed9fb1 py/mpconfig.h: Remove spaces in "Micro Python" and remove blank line. 2017-06-26 12:29:20 +10:00
Paul Sokolovsky a926119099 docs/ref/speed_python: Update and make more hardware-neutral.
Move hardware-specific optimizations to the very end of document, and
add visible note that it gives an example for Pyboard. Remove references
to specific hardware technologies, so the doc can be more naturally
used across ports. Various markup updates to adhere to the latest
docs conventions.
2017-06-26 01:11:17 +03:00
Paul Sokolovsky dd16e21562 docs/network: Use markup adhering to the latest docs conventions. 2017-06-26 00:37:30 +03:00
Paul Sokolovsky 7c0e1f1a08 docs/machine*: Use markup adhering to the latest docs conventions. 2017-06-25 13:30:29 +03:00
Paul Sokolovsky cfce7d784e docs/lcd160cr: Group related constants together. Use full sentences.
Per the latest docs conventions.
2017-06-25 13:28:23 +03:00
Paul Sokolovsky ba33c544bb docs/conf.py: Set default_role = 'any'.
This causes `symbol` syntax to be equivalent to :any:`symbol`, which is
in turn the easiest way to cross-reference an arbitrary symbol in the
docs:

http://www.sphinx-doc.org/en/stable/markup/inline.html#role-any

:any: requires at least Sphinx 1.3 (for reference, Ubuntu 16.03 ships
with 1.3.6, the latest 1.6.3).

Any many of our docs, `symbol` is misused to specify arguments to
functions, etc. Refactoring that is in progress. (CODECONVENTIONS
already specify proper syntax for both arguments and xrefs, based
on CPython conventions).
2017-06-25 00:57:44 +03:00
Paul Sokolovsky 6f87b03e3c docs/utime: Use markup adhering to the latest conventions. 2017-06-25 00:54:38 +03:00
Paul Sokolovsky 1e31d4bdf6 docs/lcd160cr: Use markup adhering to the latest conventions. 2017-06-25 00:46:07 +03:00
Paul Sokolovsky 176aa681f0 CODECONVENTIONS: docs: Markup for None/True/False.
Based on what CPython uses. However, Read The Docs theme styles this
markup in very stand-out way, so we may think what to do about it.
2017-06-25 00:26:44 +03:00
Paul Sokolovsky 7f2bc83dbc docs/btree: Use markup adhering to the latest conventions. 2017-06-25 00:17:18 +03:00
Paul Sokolovsky e92602ba27 CODECONVENTIONS: Start to describe docs conventions. 2017-06-25 00:13:13 +03:00
Paul Sokolovsky bc790b5145 docs/builtins: List builtin exceptions.
If for nothing else, then at least to cross-reference them.
2017-06-24 23:45:38 +03:00
Paul Sokolovsky 602f7e2189 esp8266/README: Make "Documentation" a top-level section. 2017-06-24 17:38:53 +03:00
Paul Sokolovsky 7455e40186 README: Mention support for bytecode and frozen bytecode. 2017-06-24 17:33:47 +03:00
Paul Sokolovsky 91e93a9684 extmod/moduzlib: decompress: Remove stale "(void)n_args".
n_args is now actually used in this function.
2017-06-24 16:36:05 +03:00
Paul Sokolovsky c4e3a03fa5 docs/gc: Document gc.threshold() function. 2017-06-24 13:35:41 +03:00