summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2018-12-06Rework safe mode and have heap overwrite trigger it.Scott Shawcroft
This creates a common safe mode mechanic that ports can share. As a result, the nRF52 now has safe mode support as well. The common safe mode adds a 700ms delay at startup where a reset during that window will cause a reset into safe mode. This window is designated by a yellow status pixel and flashing the single led three times. A couple NeoPixel fixes are included for the nRF52 as well. Fixes #1034. Fixes #990. Fixes #615.
2018-12-04Add stack validity check and raise an error when it happens.Scott Shawcroft
The backtrace cannot be given because it relies on the validity of the qstr data structures on the heap which may have been corrupted. In fact, it still can crash hard when the bytecode itself is overwritten. To fix, we'd need a way to skip gathering the backtrace completely. This also increases the default stack size on M4s so it can accomodate the stack needed by ASF4s nvm API.
2018-12-03UART changes: timeout in secs, write bytes, etc.Dan Halbert
2018-11-30Add support for adding release info into adafruit/circuitpython-orgScott Shawcroft
This also changes the build script to python with better output.
2018-11-13Support OSError attributesNoralf Trønnes
This adds support for the OSError attributes : errno, strerror, filename and filename2. CPython only sets errno if 2 arguments has been passed in. This has not been implemented here. CPython OSError.args is capped at 2 items for backward compatibility reasons. This has not been implemented here. MICROPY_CPYTHON_COMPAT has to be enabled to get these attributes. mp_common_errno_to_str() has been extended to check mp_errno_to_str() as well. This is done to ease reuse for the strerror argument.
2018-11-09Fix output overflow and make help translatableScott Shawcroft
2018-11-09Build refinement to handle warnings and quiet outputScott Shawcroft
2018-10-24Merge pull request #1167 from notro/cpython_stdlibScott Shawcroft
Support CPython standard library
2018-10-18Use python3 for mpy-toolScott Shawcroft
2018-10-17Add debug info to the generated frozen_mpy.cScott Shawcroft
It adds size info and uses macros for byte code to make it more readable.
2018-10-07modsys: exc_info: Add tracebackNoralf Trønnes
Add traceback chain to sys.exec_info()[2]. No actual frame info is added, but just enough to recreate the printed exception traceback. Used by the unittest module which collects errors and failures and prints them at the end.
2018-10-07py/objboundmeth: Support __func__ property as in CPythonNoralf Trønnes
This gives access to the function underlying the bound method. Used in the converted CPython stdlib logging.Formatter class to handle overrriding a default converter method bound to a class variable. The method becomes bound when accessed from an instance of that class. I didn't investigate why CircuitPython turns it into a bound method.
2018-10-07py/builtinimport: Set __file__ on MPY modulesNoralf Trønnes
This sets the __file__ property on MPY modules like how it's done on pure python modules.
2018-10-07fix compilation errors in emitinlinethumb.cUri Shaked
2018-08-25Revert "py/vm: Improve performance of opcode dispatch when using switch stmt."Noralf Trønnes
This reverts commit 869024dd6e62905b7e1069b547856a769b3b24ba. Ctrl-C stopped producing KeyboardInterrupt with this change on CircuitPython. The Unix and stm32 ports handles Ctrl-C differently with a handler which is probably why they where not affected. Fixes #1092
2018-08-17Merge pull request #1064 from notro/i2cslaveScott Shawcroft
Add busio.I2CSlave
2018-08-16Fix test that broke due to decompressing to too small of a scope.Scott Shawcroft
2018-08-16Fix esp and samdScott Shawcroft
2018-08-16fix mpy-crossScott Shawcroft
2018-08-16Compress all translated strings with Huffman coding.Scott Shawcroft
This saves code space in builds which use link-time optimization. The optimization drops the untranslated strings and replaces them with a compressed_string_t struct. It can then be decompressed to a c string. Builds without LTO work as well but include both untranslated strings and compressed strings. This work could be expanded to include QSTRs and loaded strings if a compress method is added to C. Its tracked in #531.
2018-08-16Add i2cslave.I2CSlave bindingsNoralf Trønnes
2018-08-10Fix translation newlinesScott Shawcroft
Escape table was incorrect
2018-08-09Rework escaping and fix ESP build.Scott Shawcroft
2018-08-09Update filter and handle nested quotesScott Shawcroft
2018-08-09Two fixes and translate more strings.Scott Shawcroft
* Fix finding translations with escaped characters. * Add back \r to translations since its needed by screen.
2018-08-07Support internationalisation.Scott Shawcroft
2018-08-02Rename to SRC_QSTR_PREPROCESSOR for clarity.Scott Shawcroft
2018-08-02Handle emitnative.c which is #included into other .c files.Scott Shawcroft
2018-08-02Speed up QSTR creation by pre-filtering files before pre-processing.Scott Shawcroft
2018-07-28Merge remote-tracking branch 'adafruit/master' into micropython-25ae98f-mergeDan Halbert
2018-07-28merge finishedDan Halbert
2018-07-25Merge remote-tracking branch 'adafruit/3.x' into import_mergeScott Shawcroft
2018-07-23WIP: complete manual inspection of all significant changesDan Halbert
2018-07-19Prevent repetitive recursive scanning of dicts when making them long-livedDan Halbert
2018-07-16Merge branch 'master' into micropython-25ae98f-mergeDan Halbert
2018-07-14do not call property if referenced by class, not objectDan Halbert
2018-07-13compiles and runs; hangs on import storage;storage.VfsFat.<tab>Dan Halbert
2018-07-12continued WIP: almost compilingDan Halbert
2018-07-11WIP: after merge; before testingDan Halbert
2018-07-03Limit qstr pool size to reduce memory waste.Scott Shawcroft
2018-07-03Always collect after an importScott Shawcroft
Imports generate a lot of garbage so cleaning it up immediately reduces the likelihood longer lived data structures don't end up in the middle of the heap. Fixes #856
2018-07-03Analysis fixes and long lived tweaks.Scott Shawcroft
2018-06-22py/compile: Combine expr, xor_expr and and_expr into one function.Damien George
This and the previous 4 commits combined have change in code size of: bare-arm: -92 minimal x86: -544 unix x64: -544 unix nanbox: -712 stm32: -116 cc3200: -128 esp8266: -348 esp32: -232
2018-06-22py/compile: Combine or_test and and_test compile functions.Damien George
2018-06-22py/compile: Combine global and nonlocal statement compile functions.Damien George
2018-06-22py/compile: Combine subscript_2 and subscript_3 into one function.Damien George
2018-06-22py/compile: Combine break and continue compile functions.Damien George
2018-06-20py/stream: Remove stray empty line at start of file.Damien George
This was accidentally added in 6abede2ca9e221b6aefcaccbda0c89e367507df1
2018-06-20py: Add checks for stream objects in print() and sys.print_exception().Damien George
2018-06-20py/stream: Update comment for mp_stream_write_adaptor.Damien George