Wykres commitów

1198 Commity (06a2abae5639997ad23ce027634cdd58d12c48c0)

Autor SHA1 Wiadomość Data
Paul Sokolovsky 06a2abae56 uasyncio.core: Add test for cancel(coro) function. 2018-01-07 10:43:15 +02:00
Paul Sokolovsky 17a432c1a3 uasyncio.core: Add cancel(coro) function.
This also adds CancelledError exception and makes TimeoutError be a
subclass of it. As well as adds default exception handler for it in
the eventloop (which just skips re-adding this coro to the scheduling
queue, as expected).
2018-01-07 10:41:51 +02:00
Paul Sokolovsky c59c5c6ef8 datetime: Release 3.3.3-1. 2017-12-21 18:54:16 +02:00
Paul Sokolovsky 107c17591a datetime: test_datetime: Skip some tests for MicroPython.
Otherwise, runs completely (with object.__new__ patch).
2017-12-20 13:55:45 +02:00
Paul Sokolovsky 45fffed699 datetime: Replace '"%c" % char' with '"%s" % char'.
MicroPython may have issues with unicode chars.
2017-12-19 09:09:49 +02:00
Paul Sokolovsky fe2b6d473a datetime: Avoid float.as_integer_ratio().
MicroPython doesn't have it, so implement equivalent (+/- rounding errors)
arithmetics.
2017-12-18 00:39:01 +02:00
Paul Sokolovsky 1bde1058ce udnspkt: Release 0.1. 2017-12-17 20:56:13 +02:00
Paul Sokolovsky 1d1caa29c3 udnspkt: Add example. 2017-12-17 16:48:11 +02:00
Paul Sokolovsky 7e334411c2 udnspkt: A module to create/parse DNS packets to resolve hostnames.
This module implements "Sans I/O" approach, where packets are created/
parsed using BytesIO objects, and all networking happens outside the
module.

The module implements enough functionality to resolve a domain name
into IP address, for both IPv4 and IPv6.

Other DNS functionality is outside the scope of this module, that's
why it's called *u*dnspkt.

The API is experimental and subject to change.

This module requires .readbin()/.writebin() methods on a stream.
2017-12-17 16:27:46 +02:00
Paul Sokolovsky 7e643f6365 uasyncio.udp: Release 0.1. 2017-12-16 00:41:17 +02:00
Paul Sokolovsky eb7d34d127 uasyncio.udp: Add example interacting with dnsmasq DNS. 2017-12-16 00:40:35 +02:00
Paul Sokolovsky 916e15ed35 uasyncio.udp: New functional API, mimicking socket module.
Don't have any wrapper classes for UDP socket, instead just have top-level
coroutines, taking raw socket as an argument:

s.recv(1500) => await uasyncio.udp.recv(s, 1500)
2017-12-16 00:40:03 +02:00
Paul Sokolovsky 057b0ba4c4 uasyncio: Release 1.4. 2017-12-15 20:25:35 +02:00
Paul Sokolovsky fede052d48 uasyncio.core: Release 1.7. 2017-12-15 20:24:40 +02:00
Paul Sokolovsky ac1d0391d8 sdist_upip: Don't treat files at the toplevel dir as resources.
E.g. README. Resources should be inside a package.
2017-12-15 00:20:59 +02:00
Paul Sokolovsky 223d91dc82 sdist_upip: Need to override setuptools' "sdist" command, not distutils'.
Without setuptools, there will be no goodies like dependencies, etc.
2017-12-15 00:08:31 +02:00
Paul Sokolovsky f6c00613db uasyncio.core: Add test for wait_for() call. 2017-12-14 19:38:49 +02:00
Paul Sokolovsky f6555bae97 uasyncio: On scheduling ready coro, unmark it as I/O-waiting.
Coros which are passed to .add_reader()/.add_writer() are marked as
I/O-bound using .pend_throw(False). Before scheduling it for normal
execution again, we need to unmark it with .pend_throw(None).
2017-12-14 19:14:42 +02:00
Paul Sokolovsky 203cc489c6 uasyncio.core: wait_for: Add support for cancelling I/O-bound coros.
Coros which removed from normal scheduling queue (and possibly put into
another queue, like I/O queue here) are marked with .pend_throw(False).
If wait_for() cancels such a coro, it is explicitly scheduled for execution,
so they actually could process pending exception (coro's exception handler
should take care of removing it from another queue and related clean up).
2017-12-14 19:09:02 +02:00
Paul Sokolovsky 0137449f1f math: Add placeholder module. 2017-12-14 09:46:45 +02:00
Paul Sokolovsky c327850c3e sdist_upip.py: Replacement for optimize_upip.py.
Unlike optimize_upip, which instantiates a separate distutils/setuptools
command to run after "sdist", sdist_upip overrides "sdist" implementation,
so it simplifies publishing workflow (no need to run adhoc commands).

Besides what optimize_upip did (post-porocessing to remove superfluous
files and recompressing with gzip 4K dictionary), sdist_upip also
adds pre-processing step of generation resource module (R.py) from
resource files.

So, now there's a single (and standard) command to generate a distrubution
package for MicroPython.
2017-12-12 23:24:37 +02:00
Paul Sokolovsky 82bb7607f3 dis: Add placeholder module. 2017-12-12 12:17:00 +02:00
Paul Sokolovsky 86f1db5f2c uasyncio.synchro: Release 0.1.1. 2017-12-12 12:12:17 +02:00
Paul Sokolovsky 340b3772a7 uasyncio.synchro: Update for cur_coro -> cur_task rename in uasyncio.core. 2017-12-12 12:10:54 +02:00
Paul Sokolovsky c279a8195f dummy_threading: Add placeholder module. 2017-12-10 17:28:52 +02:00
Paul Sokolovsky 6add549fd0 array: Add placeholder module. 2017-12-10 17:27:59 +02:00
Paul Sokolovsky f1fa3a7ff1 uasyncio: Release 1.3. 2017-12-09 18:08:50 +02:00
Paul Sokolovsky 04c0110319 uasyncio: open_connection: Initial hackish SSL support.
It performs handshake in blocking manner, hopes that writes
work without short writes, and hopes that non-blocking read
is implemented properly by ussl module (there're known issues
with axTLS module for example).
2017-12-09 18:07:32 +02:00
Paul Sokolovsky a7f8eaa6ed uasyncio.core: Release 1.6. 2017-12-09 18:05:47 +02:00
Paul Sokolovsky d19253a222 uasyncio.core: Implement wait_for() function for CPU-bound coroutines.
This requires a new .pend_throw() generator method on MicroPython side.
Timing out of I/O-bound coroutines doesn't work yet.
2017-12-03 02:09:10 +02:00
Paul Sokolovsky afa6192501 uasyncio.core: Store currently executed task as an attribute of event loop.
Currently executed task is a top-level coroutine scheduled in the event
loop (note that sub-coroutines aren't scheduled in the event loop and
are executed implicitly by yield from/await, driven by top-level coro).
2017-12-03 00:22:17 +02:00
Paul Sokolovsky d87573b113 uasyncio.udp: Initial attempt of UDP support for uasyncio.
API is not stable and will guaranteedly change, likely completely.

Currently, this tries to folow the same idea as TCP open_connection()
call, but that doesn't make much sense, so that will likely change.
2017-12-03 00:07:12 +02:00
Paul Sokolovsky ec7a9a1f20 uasyncio: README: Mention .awrite() and .aclose() methods vs asyncio. 2017-12-02 12:59:33 +02:00
Paul Sokolovsky f8c403ef4f urequests: Release 0.5.1. 2017-12-02 12:57:06 +02:00
Manos Tsagkias 6c141990ac urequests: Set Content-Type to application/json when json param is used.
Otherwise, some servers don't recognize the payload as JSON.
2017-12-02 12:54:27 +02:00
Paul Sokolovsky f971582069 make_metadata.py: Support plain README files for long_desc. 2017-11-27 00:16:24 +02:00
Paul Sokolovsky 15dd925df9 uaiohttpclient: Release 0.5.
This module was imported from a standalone repository:
https://github.com/pfalcon/micropython-uaiohttpclient
2017-11-26 19:01:31 +02:00
Paul Sokolovsky 98eb9b8194 uaiohttpclient: Add User-Agent to request, some sites don't like lack of it. 2017-11-26 18:55:16 +02:00
Paul Sokolovsky 0976a44c57 uaiohttpclient: Switch to use StreamWriter.aclose(). 2017-11-26 18:55:11 +02:00
Paul Sokolovsky 2d23c7f125 uaiohttpclient: Only http: protocol is supported, fail predictably for others. 2017-11-26 18:55:06 +02:00
Paul Sokolovsky 16c57c50f4 uaiohttpclient: Add support for redirects. 2017-11-26 18:55:03 +02:00
Paul Sokolovsky 5e1af0f277 uaiohttpclient: Implement support for chunked transfer encoding.
Chunked T-E is mandatory for HTTP/1.1, and thus prerequisite for supporting
it.
2017-11-26 18:54:57 +02:00
Paul Sokolovsky 8c1e077fc0 uaiohttpclient: Use "Connection: close" as workaround for broken HTTP 1.0 servers. 2017-11-26 18:54:39 +02:00
Paul Sokolovsky 51cd47ae2f uaiohttpclient: Add README. 2017-11-26 18:54:36 +02:00
Paul Sokolovsky c2dce8f68a uaiohttpclient: Add usage example. 2017-11-26 18:54:33 +02:00
Paul Sokolovsky a9c6c296f0 uaiohttpclient: Initial implementation of the client.
Can do GET requests for URL, nothing more.
2017-11-26 18:53:57 +02:00
Paul Sokolovsky 5ef2821025 uasyncio.synchro: Release 0.1. 2017-11-26 10:10:39 +02:00
Paul Sokolovsky 5bebece527 random: Release 0.2. 2017-11-26 00:04:07 +02:00
Paul Sokolovsky 6568c0380e random: Add shuffle(). 2017-11-26 00:03:16 +02:00
Paul Sokolovsky 9edb4ec580 random: Add randint(). 2017-11-25 18:59:52 +02:00