Wykres commitów

1375 Commity (a336c29cc5d9117bc56059c7f9dc13008fa9af4c)

Autor SHA1 Wiadomość Data
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
Paul Sokolovsky 403d850cf7 random: Release 0.1. 2017-11-25 12:33:16 +02:00
Paul Sokolovsky 7c6e26bfcd random: Add test_randrange.py. 2017-11-25 12:32:32 +02:00
Paul Sokolovsky ac6fcb4729 random: Add randrange() implementation.
The idea behind this implementation is that getrandbits() is guaranteed
(required) to be equally distributed. Thus, we can just repeatedly
sample it until get a suitable value, there's no bias accumulated and
the process should be finite (and on average take few iterations).
2017-11-25 12:30:42 +02:00
Paul Sokolovsky 693b229f8d pickle: Very rough implementation of pickle loads from imported modules.
Allows to implement minimal pickling for datetime objects.
2017-11-12 00:34:04 +02:00
Paul Sokolovsky 96a6033715 test.support: Add dummy @requires_IEEE_754 decorator.
Used e.g. by datetime/test_datetime.py.
2017-11-12 00:32:46 +02:00
Paul Sokolovsky 62597352e4 datetime: Add test from CPython 3.3.3.
Originally named datetimetester.py .
2017-11-12 00:28:14 +02:00
Paul Sokolovsky 587596401c datatime: Add from CPython 3.3.3. 2017-11-12 00:27:22 +02:00
Paul Sokolovsky 97dbe6c8ca unicodedata: Release 0.0.3. 2017-11-09 19:15:47 +02:00
Riccardo Magliocchetti 8b3fbc0c7d unicodedata: add dummy normalize implementation 2017-11-09 19:15:15 +02:00
Paul Sokolovsky f704ac5817 uasyncio: StreamReader: Separate "poll socket" vs "I/O socket".
Poll socket is what's passed to uselect.poll(), while I/O socket is what's
used for .read(). This is a workaround of the issue that MicroPython doesn't
support proxying poll functionality for stream wrappers (like SSL, websocket,
etc.)
This issue is tracked as https://github.com/micropython/micropython/issues/3394

It may be that it's more efficient to apply such a workaround on uasyncio
level rather than implementing full solution of uPy side.
2017-11-05 18:01:21 +02:00
Paul Sokolovsky bd828087e1 uasyncio: Release 1.2.4. 2017-11-05 17:52:15 +02:00
Paul Sokolovsky 9c18d6f39b uasyncio: test_http_server_heavy: Close socket with "finally". 2017-11-05 17:46:50 +02:00
Paul Sokolovsky f81285ff4e uasyncio: Auto-unregister poll objects on POLLHUP/POLLERR.
POLLHUP/POLERR may be returned anytime (per POSIX, these flags aren't
even valid in input flags, they just appear in output flags). Subsequent
I/O operation on stream will lead to exception. If an application
doesn't do proper exception handling, the stream won't be closed, and
following calls will return POLLHUP/POLLERR status again (infinitely).
So, proactively unregister such a stream.

This change is questionable, because apps should handle errors properly
and close the stream in such case (or it will be leaked), and closing
will remove the stream from poller too.

But again, if that's not done, it may lead to cascade of adverse effects,
e.g. after eef054d98, benchmark/test_http_server_heavy.py regressed and
started and started to throw utimeq queue overflow exceptions. The story
behind it is: Boom benchmarker does an initial probe request to the app
under test which it apparently doen't handle properly, leading to
EPIPE/ECONNRESET on the side of the test app, the app didn't close the
socket, so each invocation to .wait() resulted in that socket being
returned with POLLHUP again and again. Given that after eef054d98, .wait()
is called on each even loop iteration, that create positive feedback in
the queue leading to it growing to overflow.
2017-11-05 17:12:12 +02:00
Paul Sokolovsky dd30302f4b gettext: Release 0.1. 2017-11-05 12:51:47 +02:00
Riccardo Magliocchetti 6b93948472 gettext: implement gettext and ngettext
By wrapping the C counterparts
2017-11-05 12:51:13 +02:00
Paul Sokolovsky 91d176d57a functools: Release 0.0.7. 2017-11-05 12:35:45 +02:00
Riccardo Magliocchetti 7945617727 functools: add missing arguments to update_wrapper and wraps
Still dummy though.
2017-11-05 10:58:01 +01:00
Paul Sokolovsky f08c8dfc9d venv: Add dummy module. 2017-11-04 23:52:16 +02:00
Paul Sokolovsky b7f0b1a451 zlib: Add dummy module. 2017-11-04 00:04:11 +02:00
Paul Sokolovsky 93da05d3da sys: Add placeholder module. 2017-11-04 00:02:55 +02:00
Paul Sokolovsky e268fd4543 uasyncio.synchro: Add Lock example. 2017-11-03 00:45:57 +02:00
Paul Sokolovsky 3c805874d7 uasyncio.synchro: New submodule for synchronization primitives, Lock added. 2017-11-03 00:40:28 +02:00
Paul Sokolovsky 2829d4adc9 threading: Release 0.1. 2017-11-01 01:41:54 +02:00