Paul Sokolovsky
6f27ec1cd0
asyncio_micro: Work around stupid Python closures.
...
Which don't close variables, just variable references.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
a728368a08
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-11 05:19:50 +03:00
Paul Sokolovsky
6347de1537
asyncio: Clean up code a bit.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
dab2a2233e
asyncio: Remove polling sleep implementation, it belongs in async_slow.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
dd80d18866
asyncio_slow: Add example of wait() from docs.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
be628acf7d
asyncio_slow: Fix wait: again, should not schedule anything itself.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
96cbb50e27
asyncio_slow: Add Future examples from docs.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
8711a45a13
asyncio_slow: Implement loop.stop().
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
3a639ce666
asyncio_slow: run_until_complete() should not schedule anyhing.
...
Everything should be scheduled either already, or async() does this.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
6bff4dbe72
asyncio_slow: Add example on chaining coros using "yield from" from docs.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
6ded654afe
asyncio_slow: Add example for scheduling coro using Task.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
93178819b3
asyncio_slow: Add coroutine example from docs.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
b0c4fc7536
asyncio_slow: Add callback example from docs.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
1d7b189e75
asyncio_slow: Fix call_soon(), add call_later().
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
5166ecbbd1
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-11 05:19:50 +03:00
Paul Sokolovsky
4c4a74368a
asyncio: Add basic asyncio stream interface test.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
2caed7ddef
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-11 05:19:50 +03:00
Paul Sokolovsky
e6ed3ffceb
asyncio: Add basic loop.call_soon() test.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
ebc6a1faf2
asyncio: Add asyncio.async() dummy factory function.
...
Not Task bloat implemented (so far?), so just identity function for CPython
compatibility.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
395e2ecee6
asyncio: Add remove_reader()/remove_writer().
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
dddf237fb6
asyncio: Use logging and errno modules.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
40af791abf
asyncio: Add dumb debug output.
2014-10-11 05:19:50 +03:00
Paul Sokolovsky
0762929bd3
asyncio: Start adding asyncio stream interface.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
f9fd9ddd42
asyncio: Support read/write syscalls, and route vals both ways between coros.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
b8f41198de
asyncio: EpollEventLoop.wait(): support infinite wait.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
dbb8857e15
asyncio: Make run_forever() actually run forever.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
7b5780bc66
asyncio: Recover eventloop's ability to work with callbacks.
...
Actually, coroutine support for call_soon() is a hack, in big asyncio coroutine
should be wrapped in Task object.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
a80cf93d4a
asyncio: Implement subclass implementing filedes watching interface.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
fb41c0e2e3
asyncio: Initial prototype implementation.
2014-10-11 05:19:49 +03:00
Paul Sokolovsky
e42b955c1d
socket: Update for rename microsocket -> usocket.
2014-10-11 05:18:49 +03:00
Paul Sokolovsky
d33f35334b
_libc: Release 0.2.1.
2014-10-11 05:17:14 +03:00
blmorris
814071f45b
_libc: Add support for MacOS X (using "libc.dylib").
2014-10-06 23:39:22 +03:00
Damien George
f2cb007ce5
sqlite3: Change return type of column_double from "f" to "d".
...
ffi now works properly with double return type, so this function can
return the correct type. Can confirm that sqlite3_column_double now
works correctly on 32-bit and 64-bit x86.
2014-09-10 21:06:54 +01:00
Paul Sokolovsky
bc1ea4fc21
_libc: Version 0.2.
2014-09-08 20:02:42 +03:00
Paul Sokolovsky
165fbbd768
select: Add yet another workaround for struct epoll_event, this time for x86_64.
...
So, it's now clear that dealing with this struct should be rather moved on C side.
2014-09-06 19:36:28 +03:00
Paul Sokolovsky
22da54bc83
os: Version 0.1.9.
2014-09-06 17:13:28 +03:00
Paul Sokolovsky
a9fd762b81
os: listdir(), walk(): Handle unicode strings properly.
...
CPython lib reference specifies that listdir() should accept both bytes and
str argument, and return value type should match the argument. But no such
stipulation is made for walk(), so we just return strings.
2014-09-06 17:06:07 +03:00
Paul Sokolovsky
a3495c40bf
os: Fix 64-bit Linux support.
...
ino_t and off_t types (d_ino and d_off fields) appear to be defined as unsigned
long on Linux.
TODO: Move readdir wrapper function to C, because DIRENT layout is inherently
OS-specific.
2014-09-06 17:04:05 +03:00
Paul Sokolovsky
46ede279d8
os: Implement open().
2014-08-23 05:57:00 +03:00
Paul Sokolovsky
6f1823b60e
LICENSE: Add concatenation of licensing terms used.
2014-08-18 21:32:04 +03:00
Paul Sokolovsky
7bc0c0a458
select: Version 0.0.8.
2014-08-13 00:56:23 +03:00
Dave Hylands
eac000342e
cmd: Customize to work with MicroPython.
2014-08-13 00:49:28 +03:00
Dave Hylands
d71c6a3a0b
cmd: Original version of cmd.py from Python 3.4
2014-08-13 00:48:34 +03:00
Paul Sokolovsky
8274c56925
select: Work around epoll_event field alignment variation.
2014-08-10 23:10:48 +03:00
Paul Sokolovsky
104471e208
README: Quotes really weren't intended here.
2014-08-10 17:35:43 +03:00
Paul Sokolovsky
e375a91fa1
Merge pull request #5 from willingc/patch-1
...
Documentation edits to README.md
2014-08-10 17:34:16 +03:00
Carol Willing
4b70d46de3
Documentation edits to README.md
...
Proposed edits to increase user readability and ease of use of the README page.
2014-08-04 18:15:00 -07:00
Paul Sokolovsky
ad7b1ad64e
sqlite3: Less obtrusive debug output.
2014-07-21 01:33:46 +03:00
Paul Sokolovsky
bf811614cf
heapq: Import itertools only for functions which really require it.
2014-07-21 00:29:33 +03:00
Paul Sokolovsky
3de140698c
os: Don't use legacy getwd() libc function, not available in all libc's.
...
For example, not available in uclibc.
2014-07-11 02:20:04 +03:00