summaryrefslogtreecommitdiffstatshomepage
path: root/py/qstrdefs.h
Commit message (Collapse)AuthorAge
* py: Implement __dict__ for instances.stijn2016-01-03
| | | | | | Note that even though wrapped in MICROPY_CPYTHON_COMPAT, it is not fully compatible because the modifications to the dictionary do not propagate to the actual instance members.
* py: Clean up instantiation of dupterm object.Paul Sokolovsky2016-01-01
| | | | To comply with already established scheme for extmod's.
* stmhal: Add struct qstr to block of qstrs needed for MICROPY_PY_STRUCT.Dave Hylands2015-12-28
| | | | Otherwise build fails if uctypes is disabled.
* extmod/fsusermount: Move module qstrs to global pool from stmhal port.Paul Sokolovsky2015-12-25
|
* ports: Rename "machine" module to "umachine".Paul Sokolovsky2015-12-18
| | | | | | | | To let unix port implement "machine" functionality on Python level, and keep consistent naming in other ports (baremetal ports will use magic module "symlinking" to still load it on "import machine"). Fixes #1701.
* py: Add min/max "default" keyword argumentpohmelie2015-12-07
|
* py: Add MICROPY_PY_BUILTINS_MIN_MAX, disable for minimal ports.pohmelie2015-12-07
|
* py/modsys: Implement sys.modules.Paul Sokolovsky2015-12-05
| | | | | This for example will allow people to reload modules which didn't load successfully (e.g. due to syntax error).
* py/modmath: Make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS.Damien George2015-11-17
| | | | | | Will be included only when MICROPY_PY_MATH_SPECIAL_FUNCTIONS is enabled. Also covers cmath module (but only log10 is there at the moment).
* extmod/modlwip: slip: Use stream protocol and be port-independent.Paul Sokolovsky2015-10-27
| | | | | Based on the original patch by Galen Hazelwood: https://github.com/micropython/micropython/pull/1517 .
* py: Add support for _ in REPL to hold last computed value.Damien George2015-10-17
| | | | Only available when MICROPY_CAN_OVERRIDE_BUILTINS is enabled.
* py: Implement ptr32 load and store in viper emitter.Damien George2015-10-13
|
* modussl: SSL socket wrapper module based on axTLS.Paul Sokolovsky2015-10-06
|
* py: Make "enumerate" qstr be conditional on MICROPY_PY_BUILTINS_ENUMERATE.Paul Sokolovsky2015-09-03
|
* py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.Paul Sokolovsky2015-08-20
| | | | Saves 320 bytes on x86.
* py: Add stream_tell method, and use for unix and stmhal file tell.blmorris2015-08-13
|
* py: Make qstr hash size configurable, defaults to 2 bytes.Damien George2015-07-20
| | | | | | | This patch makes configurable, via MICROPY_QSTR_BYTES_IN_HASH, the number of bytes used for a qstr hash. It was originally fixed at 2 bytes, and now defaults to 2 bytes. Setting it to 1 byte will save ROM and RAM at a small expense of hash collisions.
* extmod: Add a2b_base64 and b2a_base64 functions to ubinascii.Galen Hazelwood2015-07-04
|
* py: Add TimeoutError exception subclassed from OSError.Daniel Campora2015-07-02
| | | | | | | The TimeoutError is useful for some modules, specially the the socket module. TimeoutError can then be alised to socket.timeout and then Python code can differentiate between socket.error and socket.timeout.
* stmhal: Implement sys.std{in,out,err}.buffer, for raw byte mode.Damien George2015-05-24
| | | | It's configurable and only enabled for stmhal port.
* py: Remove hexdigest QSTR since the method has been removed as well.Daniel Campora2015-05-21
|
* extmod: Add ubinascii.unhexlifyDave Hylands2015-05-20
| | | | This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
* modbuiltins: Add NotImplemented builtin constant.Paul Sokolovsky2015-05-04
| | | | | | | | | | | | From https://docs.python.org/3/library/constants.html#NotImplemented : "Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type; may be returned by the in-place binary special methods (e.g. __imul__(), __iand__(), etc.) for the same purpose. Its truth value is true." Some people however appear to abuse it to mean "no value" when None is a legitimate value (don't do that).
* modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky2015-05-04
|
* modstruct: Group module qstr's together.Paul Sokolovsky2015-05-04
|
* modmachine: Add new module to access hardware, starting with physical memory.Paul Sokolovsky2015-05-04
| | | | | Refactored from "stm" module, provides mem8, mem16, mem32 objects with array subscript syntax.
* modsys: Add basic sys.exc_info() implementation.Paul Sokolovsky2015-04-25
| | | | | | The implementation is very basic and non-compliant and provided solely for CPython compatibility. The function itself is bad Python2 heritage, its usage is discouraged.
* py: Add sys.implementation, containing uPy name and version number.Damien George2015-04-21
| | | | Uses attrtuple if it's enabled, otherwise just a normal tuple.
* py: Make viper codegen raise proper exception (ViperTypeError) on error.Damien George2015-04-20
| | | | | | | | | | | This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940.
* py: Implement delete for property and descriptors.Damien George2015-04-04
| | | | | Without this patch deleting a property, or class with descriptor, will call the setter with a NULL value and lead to a crash.
* objstr: Add .splitlines() method.Paul Sokolovsky2015-04-04
| | | | | | | | | splitlines() occurs ~179 times in CPython3 standard library, so was deemed worthy to implement. The method has subtle semantic differences from just .split("\n"). It is also defined as working for any end-of-line combination, but this is currently not implemented - it works only with LF line-endings (which should be OK for text strings on any platforms, but not OK for bytes).
* objtype: Add special unary methods __pos__, __neg__, __invert__.Paul Sokolovsky2015-03-31
| | | | Conditional on MICROPY_PY_ALL_SPECIAL_METHODS.
* py: Add optional support for descriptors' __get__ and __set__ methods.stijn2015-03-26
| | | | Disabled by default. Enabled on unix and windows ports.
* py: Implement core of OrderedDict type.Paul Sokolovsky2015-03-20
| | | | | | | | | | | | Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
* py: Add support for start/stop/step attributes of builtin range object.Peter D. Gray2015-03-11
|
* py: Implement UnicodeError.Paul Sokolovsky2015-02-23
| | | | | Still too shy to implement UnicodeEncodeError which was really needed for micropython-lib case.
* py: Make math special functions configurable and disabled by default.Damien George2015-02-22
| | | | | | | The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
* py: Add few more special methods.Paul Sokolovsky2015-02-22
|
* stackctrl: Encode "recursion depth exceeded" message as qstr.Paul Sokolovsky2015-02-15
| | | | So corresponding exception can be thrown even under tight memory conditions.
* py: Add setattr builtin.stijn2015-02-14
|
* py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it.Paul Sokolovsky2015-01-31
|
* py: Implement __reversed__ slot.Damien George2015-01-21
| | | | Addresses issue #1073.
* py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1.Damien George2015-01-11
| | | | | | | | | | | | | | | | | | This new config option sets how many fixed-number-of-bytes to use to store the length of each qstr. Previously this was hard coded to 2, but, as per issue #1056, this is considered overkill since no-one needs identifiers longer than 255 bytes. With this patch the number of bytes for the length is configurable, and defaults to 1 byte. The configuration option filters through to the makeqstrdata.py script. Code size savings going from 2 to 1 byte: - unix x64 down by 592 bytes - stmhal down by 1148 bytes - bare-arm down by 284 bytes Also has RAM savings, and will be slightly more efficient in execution.
* py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script.Damien George2015-01-11
|
* py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs.Damien George2015-01-09
| | | | | | This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
* py: Move to guarded includes, everywhere in py/ core.Damien George2015-01-01
| | | | Addresses issue #1022.
* py: Add execfile function (from Python 2); enable in stmhal port.Damien George2014-12-19
| | | | Adds just 60 bytes to stmhal binary. Addresses issue #362.
* modsys: Add sys.print_exception(exc, file=sys.stdout) function.Paul Sokolovsky2014-12-08
| | | | | | | | | | | | The function is modeled after traceback.print_exception(), but unbloated, and put into existing module to save overhead on adding another module. Compliant traceback.print_exception() is intended to be implemented in micropython-lib in terms of sys.print_exception(). This change required refactoring mp_obj_print_exception() to take pfenv_t interface arguments. Addresses #751.
* modmicropython: Move mem_info() and qstr_info() functions from unix port.Paul Sokolovsky2014-12-01
| | | | TODO: Merge useful functionality from modpyb too.
* modubinascii: Add, with hexlify() implementation.Paul Sokolovsky2014-11-29
|