Wykres commitów

1139 Commity (f704ac5817e89232622c23ef27a2254558313858)

Autor SHA1 Wiadomość Data
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
Paul Sokolovsky 8f08257512 pickle: Add dummy HIGHEST_PROTOCOL, accept dummy proto in dump, dumps.
For compatibility with CPython.

These are probably not good for low-resource ports, but for them we may
need to create upickle.
2017-10-22 19:50:20 +03:00
Paul Sokolovsky 03bb3ad060 io: Release 0.1. 2017-10-21 21:36:44 +03:00
Paul Sokolovsky 72315593b3 io: Add SEEK_* symbolic constants. 2017-10-21 21:34:41 +03:00
Paul Sokolovsky 1bae9c92c4 select: Release 0.3. 2017-10-21 21:28:43 +03:00
Reid Wagner c09b364253 select: epoll: Recompute timeout after EINTR.
As detailed in PEP 475, timeout should be recomputed before retrying
the interrupted system call.
2017-10-21 21:27:57 +03:00
Paul Sokolovsky c8f9cf1dca select: epoll.poll() takes timeout in seconds.
That's inconsistent with poll.poll(), but that's how CPython has it.
2017-10-21 00:40:50 +03:00
Paul Sokolovsky 61f9dd8721 os.path: test_path.py: Use paths relative to module dir.
Allows to run via test aggregators.
2017-10-18 14:03:05 +03:00
Paul Sokolovsky e9b54606e9 os: test_filestat.py: Use paths relative to module dir.
Allows to run via test aggregators.
2017-10-13 20:24:35 +03:00
Paul Sokolovsky 54e466d650 upip: Makefile: Remove unused dependencies. 2017-10-12 20:04:29 +03:00
Paul Sokolovsky 98bf9edccc fnmatch: test_fnmatch: Disable tests for bytes arguments.
re-pcre doesn't work properly with bytes patterns so far, disable the test
until later.
2017-10-11 20:12:21 +03:00
Paul Sokolovsky 8cca4dffce glob: test_glob: Consistently disable tests for bytes arguments.
MicroPython doen't fully implement str vs bytes dichotomy on "os" module
level, so it doesn't work for glob either.
2017-10-10 17:30:41 +03:00
Paul Sokolovsky 56434974a7 select: Release 0.2. 2017-10-07 01:14:30 +03:00
Paul Sokolovsky f5bc4d8ea3 select: Re-export uselect module contents (poll() and related). 2017-10-07 01:13:28 +03:00
Reid Wagner 423e6c6a53 select: Add POLLPRI mask.
Value is per Linux.
2017-10-07 01:10:28 +03:00
Paul Sokolovsky 643b1d0fab os: Rename examples as such.
To not be mixed up with real tests.
2017-10-04 23:37:44 +03:00
Paul Sokolovsky f6a043e128 traceback: Release 0.3. 2017-10-03 22:24:13 +03:00
Riccardo Magliocchetti 151c671243 traceback: Add basic versions of format_exc() and format_exception(). 2017-10-03 22:22:30 +03:00
Riccardo Magliocchetti d040285fbd pwd: add basic implementation of pwd
The only function implemented is getpwnam
2017-10-03 22:18:27 +03:00
Paul Sokolovsky 83b6c02881 asyncio_slow: Rename examples as such.
To not be mixed up with real tests.
2017-09-30 18:40:23 +03:00
Paul Sokolovsky 027d8f6d7f upip: Release 1.2.2. 2017-09-29 18:21:32 -07:00
Paul Sokolovsky eaf9f91d39 upip: upip_utarfile: Update for str.rstrip() fixes.
Propagated from utarfile.
2017-09-29 18:20:52 -07:00
Paul Sokolovsky a015fca3fa utarfile: Update for str.rstrip() fixes.
rstrip() without args no longer strips "\0", we need to do that explicitly.
2017-09-29 18:19:44 -07:00