| Age | Commit message (Collapse) | Author |
|
STATE_NEW will return HUP when polled so put active UDP sockets into a new
state which is different to STATE_NEW.
Fixes issue #5758.
|
|
|
|
|
|
|
|
It tests independent functionality and may need to be skipped for a given
port.
|
|
So accessing the seek offset (at the C level) doesn't cause an
OverflowError on 32-bit targets.
|
|
Following CPython, OrderedDict are dumped with the syntax of dict.
|
|
|
|
|
|
Also rename SEC_COUNT to BLOCK_COUNT and SEC_SIZE to BLOCK_SIZE.
|
|
|
|
|
|
Fixes issues #3178 and #5220.
Tests are added, including all the cases mentioned in both bugs.
|
|
Because this functionality was introduced in Python 3.6.
|
|
CPython allows this, and it can be useful to reduce the number of memory
allocations.
Fixes issue #5031.
|
|
Enabled via MICROPY_PY_URE_DEBUG, disabled by default (but enabled on unix
coverage build). This is a rarely used feature that costs a lot of code
(500-800 bytes flash). Debugging of regular expressions can be done
offline with other tools.
|
|
JSON requires that keys of objects be strings. CPython will therefore
automatically quote simple types (NoneType, bool, int, float) when they are
used directly as keys in JSON output. To prevent subtle bugs and emit
compliant JSON, MicroPython should at least test for such keys so they
aren't silently let through. Then doing the actual quoting is a similar
cost to raising an exception, so that's what is implemented by this patch.
Fixes issue #4790.
|
|
Fixes issue #4780.
|
|
Selectable at compile time via MICROPY_PY_UCRYPTOLIB_CTR. Disabled by
default.
|
|
Now that setblocking() is implemented in modussl_axtls, it calls into the
underlying stream object, and io.BytesIO doesn't have setblocking().
|
|
It consists of:
1. "do_handhake" param (default True) to wrap_socket(). If it's False,
handshake won't be performed by wrap_socket(), as it would be done in
blocking way normally. Instead, SSL socket can be set to non-blocking mode,
and handshake would be performed before the first read/write request (by
just returning EAGAIN to these requests, while instead reading/writing/
processing handshake over the connection). Unfortunately, axTLS doesn't
really support non-blocking handshake correctly. So, while framework for
this is implemented on MicroPython's module side, in case of axTLS, it
won't work reliably.
2. Implementation of .setblocking() method. It must be called on SSL socket
for blocking vs non-blocking operation to be handled correctly (for
example, it's not enough to wrap non-blocking socket with wrap_socket()
call - resulting SSL socket won't be itself non-blocking). Note that
.setblocking() propagates call to the underlying socket object, as
expected.
|
|
|
|
|
|
As mentioned in #4450, `websocket` was experimental with a single intended
user, `webrepl`. Therefore, we'll make this change without a weak
link `websocket` -> `uwebsocket`.
|
|
|
|
|
|
CPython does not have an implementation of select.poll() on some
operating systems (Windows, OSX depending on version) so skip the
test in those cases instead of failing it.
|
|
On almost all realistic platforms, native layout should be larger (or
equal) than packed layout.
|
|
Just a copy of uctypes_sizeof.py with minimal changes.
|
|
This test doesn't check the actual I/O behavior, just "static" invariants
like behavior on duplicate calls or calls when I/O object is not registered
with poller.
|
|
Based on tests/extmod/uhashlib_sha1.
|
|
|
|
Otherwise returning None indicates that the write would block and nothing
was actually written. Fixes issue #3990.
|
|
|
|
This feature is controlled at compile time by MICROPY_PY_URE_SUB, disabled
by default.
Thanks to @dmazzella for the original patch for this feature; see #3770.
|
|
This feature is controlled at compile time by
MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default.
Thanks to @dmazzella for the original patch for this feature; see #3770.
|
|
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_GROUPS,
disabled by default.
Thanks to @dmazzella for the original patch for this feature; see #3770.
|
|
Tests for separate input and output buffer (alloc-free operation) and
the same writable buffer used as input and output (inplace operation).
|
|
|
|
|
|
|
|
|
|
This conditional import was only used to get the tests working on the unix
coverage build, which has now switched to use VFS by default so the uos
module alone has the required functionality.
|
|
|
|
|
|
|
|
This is just to test that the function exists and returns some kind of
valid value. Although this file is for testing ms/us functions, put the
ticks_cpu() test here so not to add a new test file.
|
|
|
|
|
|
|