Wykres commitów

470 Commity (1adffc9ef86d2a150aea4467c3be8ab035619540)

Autor SHA1 Wiadomość Data
Paul Sokolovsky 4a884ef849 uasyncio: Split off uasyncio.core dist module. 2014-10-24 01:00:53 +03:00
Paul Sokolovsky 2b582fd934 uasyncio: Cleanup module imports after split up. 2014-10-24 00:32:32 +03:00
Paul Sokolovsky b2130c84ce uasyncio: Split into "core" and "extended" modules. 2014-10-24 00:24:13 +03:00
Paul Sokolovsky a295825300 uasyncio: Convert to package. 2014-10-24 00:04:37 +03:00
Paul Sokolovsky 35f4720962 uasyncio: test_http_client.py: Use run_until_complete(). 2014-10-24 00:03:27 +03:00
Paul Sokolovsky 1256840278 uasyncio: Release 0.6.2. 2014-10-21 01:31:59 +03:00
Paul Sokolovsky a776b5086e uasyncio: Add __repr__() for StreamReader/StreamWriter. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 0a20a84f61 uasyncio: Implement run_until_complete(). 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 4d0d71f974 uasyncio: Update for rename microsocket -> usocket. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 8e97b6972a uasyncio: Rename asyncio_micro to uasyncio. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 545a033933 asyncio_micro: awrite(): More logging and checks. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky abd8b1646a asyncio_micro: Add metadata. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky eff1250e3b asyncio_micro: Optimize size of SysCall objects.
We have to have type header for any object, so use type to "store"
information about syscall type (my initial idea was to have single
syscall class and dispatch on its attribute, that would save memory
on having bunch of classes, but would increase size of each syscall
object).
2014-10-21 01:31:58 +03:00
Paul Sokolovsky 06c8c6ce8f asyncio_micro: Move handle() method to SysCall base class. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 6115b451ea asyncio_micro: Clean up logging. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 4af1cf5a30 asyncio_micro: Support just plain "yield" for cooperative control yield. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky d0d2810b0c asyncio_micro: Rename StreamWriter.write() to awrite().
This method has different semantics than original asyncio, so rename to avoid
confusion. Original asyncio's is not a coroutine, while ours is.
2014-10-21 01:31:58 +03:00
Paul Sokolovsky 9c3a3cd5ed asyncio_micro: Add basic HTTP server example. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 15cc7aa7b7 asyncio_micro: Implement proper write() handling.
TODO: Test!
2014-10-21 01:31:58 +03:00
Paul Sokolovsky 6e61c501ac asyncio_micro: Support readall semantics and handle non-blocking read() well.
Non-blocking read()/write() may return None if there's no data, and that's
not EOF.
2014-10-21 01:31:58 +03:00
Paul Sokolovsky fe85cca848 asyncio_micro: Add support for starting a coroutine concurrently.
Just yield it as a value. Also, improve logging/error reporting.
2014-10-21 01:31:58 +03:00
Paul Sokolovsky bfaf6b8d19 asyncio_micro: IODone syscall should return to coroutine. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky acd25d05fc asyncio_micro: Implement start_server(). 2014-10-21 01:31:58 +03:00
Paul Sokolovsky b86919a6ff asyncio_micro: StreamReader, StreamWriter: add more methods. 2014-10-21 01:31:58 +03:00
Paul Sokolovsky 1c647189f1 asyncio_micro: Work around stupid Python closures.
Which don't close variables, just variable references.
2014-10-21 01:31:58 +03:00
Paul Sokolovsky 0b5ca354e2 asyncio_micro: Rename from asyncio.
As this is not compliant with asyncio API, can't be called asyncio, and
"micro" is just good moniker for what it's intended to be.
2014-10-21 01:31:58 +03:00
Paul Sokolovsky 4071bb5e74 asyncio: Clean up code a bit. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky bce6c1cadf asyncio: Remove polling sleep implementation, it belongs in async_slow. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 2feacf5a50 asyncio_slow: Add example of wait() from docs. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 3949d4f8b6 asyncio_slow: Fix wait: again, should not schedule anything itself. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 0b1d9a0493 asyncio_slow: Add Future examples from docs. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 30a0586732 asyncio_slow: Implement loop.stop(). 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 8d1ae59f3a asyncio_slow: run_until_complete() should not schedule anyhing.
Everything should be scheduled either already, or async() does this.
2014-10-21 01:31:57 +03:00
Paul Sokolovsky 4a3a4927c4 asyncio_slow: Add example on chaining coros using "yield from" from docs. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky ce54259e95 asyncio_slow: Add example for scheduling coro using Task. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky fdc3e21820 asyncio_slow: Add coroutine example from docs. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky d50091b802 asyncio_slow: Add callback example from docs. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 6c419ad0ec asyncio_slow: Fix call_soon(), add call_later(). 2014-10-21 01:31:57 +03:00
Paul Sokolovsky c78c27c1dd asyncio_slow: Start new upstream API-compatible asyncio implementation.
The trait of this implementation is that it doesn't use priority queue and
time scheduling, and instead does its all operations using polling, starting
with such basic one as sleep. On the other hand, this tries to implement
all (well, much) of upstream asyncio API and warts.

asyncio_slow: Rename from asyncio_micro.

It may turn out that this won't be "micro" at all. The main trait of this
implementation is that it stay 100% API compatible with upstream (in
those APIs which are implemented of course). It will also keep inefficient
implementation of event loop scheduling, to discourage its use. Here we go.
2014-10-21 01:31:57 +03:00
Paul Sokolovsky f0ce7978ce asyncio: Add basic asyncio stream interface test. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 0adccf0ab1 asyncio: Handle end of stream condition properly.
By removing any IO watches for associated file handle. The way it's
implemented tries to preserve OS-like separation between event loop and
tasks. So, stream to finish watching fd for IO also issues syscall,
instead of calling methods on loop instance directly. Calling method on
loop would be more efficient, but will require storing reference to loop
in each stream. And those separation matters...
2014-10-21 01:31:57 +03:00
Paul Sokolovsky fa273cae71 asyncio: Add basic loop.call_soon() test. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 179d0447f1 asyncio: Add asyncio.async() dummy factory function.
Not Task bloat implemented (so far?), so just identity function for CPython
compatibility.
2014-10-21 01:31:57 +03:00
Paul Sokolovsky e1537df79d asyncio: Add remove_reader()/remove_writer(). 2014-10-21 01:31:57 +03:00
Paul Sokolovsky f79b960890 asyncio: Use logging and errno modules. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 517c6ea084 asyncio: Add dumb debug output. 2014-10-21 01:31:57 +03:00
Paul Sokolovsky 02daa74b24 asyncio: Start adding asyncio stream interface. 2014-10-21 01:31:56 +03:00
Paul Sokolovsky ac0038f9a7 asyncio: Support read/write syscalls, and route vals both ways between coros. 2014-10-21 01:31:56 +03:00
Paul Sokolovsky 85071250f1 asyncio: EpollEventLoop.wait(): support infinite wait. 2014-10-21 01:31:56 +03:00
Paul Sokolovsky a71d4f45c1 asyncio: Make run_forever() actually run forever. 2014-10-21 01:31:56 +03:00