Wykres commitów

1261 Commity (09c59c47042b61e96519e22d451d36d86b37a518)

Autor SHA1 Wiadomość Data
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
Paul Sokolovsky 429f73c4a3 threading: Add very bare implementation of Thread class. 2017-11-01 00:55:30 +02:00
Paul Sokolovsky da124acfdb uasyncio: Release 1.2.3, added initial README. 2017-10-30 01:23:19 +02:00
Paul Sokolovsky 04bd0855bb codeop: Release 0.0.0. 2017-10-29 10:42:30 +03:00
Paul Sokolovsky 5b9e19cf7c codeop: Add dummy module. 2017-10-29 10:41:39 +03:00
Reid Wagner b54987bd14 select: Convert float timeout to int with math.ceil.
In CPython, timeout is a float and the value rounded up to the
nearest millisecond.
2017-10-29 10:01:00 +03:00
Paul Sokolovsky 03c1e65e6e code: Release 0.0.0. 2017-10-29 00:15:10 +03:00
Paul Sokolovsky 8e59a50ceb code: Add dummy module. 2017-10-29 00:14:30 +03:00
Paul Sokolovsky e5da0ea7c9 importlib: Release 0.0.0. 2017-10-29 00:11:15 +03:00
Paul Sokolovsky 4f7ad186c8 importlib: Add dummy module. 2017-10-29 00:09:54 +03:00
Paul Sokolovsky 3169fe388a readline: Release 0.0.0. 2017-10-28 23:16:31 +03:00
Paul Sokolovsky 18c79dbaec readline: Add dummy module. 2017-10-28 23:16:13 +03:00
Paul Sokolovsky e046338ea2 uasyncio.core: Release 1.5.1, updated description. 2017-10-28 22:52:15 +03:00
Paul Sokolovsky a314da83f1 uasyncio.core: logging is not longer hard dependency, remove it.
If user is going to enable logging in particular app, they should depend
on it themselves.
2017-10-28 02:17:24 +03:00
Paul Sokolovsky 62fbfa9965 uasyncio.core: Add yield call to remove coro from scheduling.
yield False won't reschedule current coroutine to be run again. This is
useful when coro is put on some waiting queue (and is similar to what
yield IORead/yield IOWrite do).
2017-10-28 02:14:02 +03:00