| Age | Commit message (Collapse) | Author |
|
Otherwise, it will silently get incorrect result on other values types,
including CPython tuple form like "foo.png".endswith(("png", "jpg"))
(which MicroPython doesn't support for unbloatedness).
|
|
|
|
|
|
|
|
|
|
|
|
Allows for simpler, smaller and faster code at run time when selecting the
boards frequency, and allows more customisation opportunities for the PLL
values depending on the target MCU.
|
|
Without this the pass-through will pause for 1 second at each character.
|
|
Changes for F7 are:
- machine.reset_cause() now reports DEEPSLEEP_RESET correctly;
- machine.sleep() is further optimised to reduce power consumption;
- machine.deepsleep() is now implemented and working.
|
|
|
|
|
|
This macro is provided by stmhal/mphalport.h and makes sure the addr and
size arguments are correctly aligned.
|
|
|
|
As per the "ESP8266 Technical Reference".
|
|
|
|
|
|
|
|
|
|
|
|
This prevents large files (eg larger than 2gb on a 32-bit arch) from
showing up as having a negative size. Fixes issue #3227.
|
|
This allows the command to succeed without error even if there is no
$(BUILD)/build directory, which is the case for mpy-cross.
|
|
Per POSIX, this is EINVAL, so raises OSError(EINVAL).
|
|
For SEEK_SET, offset should be treated as unsigned, to allow full-width
stream sizes (e.g. 32-bit instead of 31-bit). This is now fully documented
in stream.h. Also, seek symbolic constants are added.
|
|
Too big positive, or too big negative offset values could lead to overflow
and address space wraparound and thus access to unrelated areas of memory
(a security issue).
|
|
|
|
State that this doc describes generic, "core" MicroPython functionality,
any particular port may diverge in both directions, by both omitting
some functionality, and adding more, both cases described outside the
generic documentation.
|
|
Describe that the only portable way to deal with addresses is by using
getaddrinfo(). Describe that some ports may support tuple addresses using
"socket" module (vs "usocket" of native MicroPython).
|
|
It's too minor a point to start the module description with it.
|
|
Calls out to Zephyr's shell, submodule "net", command "iface", and shows
network interface information (if CONFIG_NET_SHELL is enabled).
|
|
The original issue leading to crash on startup if no default network
interface was presented, was resolved some time ago.
Note that this enables generic networking subsystem, not networking
on Carbon.
|
|
Was changed to "sa_family" for POSIX compatibility.
|
|
This clarifies return values and the handling of invalid (e.g. newline)
characters.
Encoding conforms to RFC 3548, but decoding does not, as it ignores invalid
characters in base64 input. Instead, it conforms to MIME handling of base64
(RFC 2045).
Note that CPython doesn't document handling of invalid characters in
a2b_base64() docs:
https://docs.python.org/3/library/binascii.html#binascii.a2b_base64 , so
we specify it more explicitly than it, based on CPython's actual behavior
(with which MicroPython now compliant).
|
|
This implementation ignores invalid characters in the input. This allows
it to decode the output of b2a_base64, and also mimics the behavior of
CPython.
|
|
The value of 0 can't be used because otherwise mp_binary_get_size will let
a null byte through as the type code (intepreted as byterray). This can
lead to invalid type-specifier strings being let through without an error
in the struct module, and even buffer overruns.
|
|
This makes the -d commandline argument usable again.
Pass empty string as parent name as listing starts from the root.
|
|
As required for zephyr.stack_analyze().
|
|
current_tid() returns current thread ID. stacks_analyze() calls
k_call_stacks_analyze() which, with CONFIG_INIT_STACKS enabled,
will print stack usage for some well-known threads in the system.
|
|
Behaviour is as per CPython but only the binary form is implemented here.
A test is included.
|
|
It enables all the DEBUG_printf outputs in the py/ source code.
|
|
Without bugfix:
struct.pack('>Q', 16)
b'\x00\x00\x00\x10\x00\x00\x00\x00'
With bugfix:
struct.pack('>Q', 16)
b'\x00\x00\x00\x00\x00\x00\x00\x10'
|
|
|
|
- Changed: ValueError, TypeError, NotImplementedError
- OSError invocations unchanged, because the corresponding utility
function takes ints, not strings like the long form invocation.
- OverflowError, IndexError and RuntimeError etc. not changed for now
until we decide whether to add new utility functions.
|
|
|
|
Implemented as a new MP_UNARY_OP. This patch adds support lists, dicts and
instances.
|
|
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top
level of this repository.
|
|
|
|
|
|
The main case to catch is invalid types for the containment operator, of
the form str.__contains__(non-str).
|
|
|
|
|