Commit Graph

21 Commits

Author SHA1 Message Date
Guido van Rossum 94ba146d11 asyncio: Add __weakref__ slots to Handle and CoroWrapper. Upstream issue #166. 2014-04-27 10:44:22 -07:00
Guido van Rossum 0cbc76880f asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163). 2014-04-15 12:06:34 -07:00
Yury Selivanov 09cc169a03 asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctly
Issue #21209.
2014-04-15 12:01:16 -04:00
Yury Selivanov f15f7484bb asyncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1
Closes issue #21209.
2014-04-14 22:21:52 -04:00
Victor Stinner f5e37037cc asyncio: Fix pyflakes warnings: remove unused variables and imports 2014-02-26 11:07:42 +01:00
Victor Stinner 7ef60cd8c2 asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.
Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since
Python startup, to be able to debug coroutines defined directly in the asyncio
module.
2014-02-19 23:15:02 +01:00
Yury Selivanov b41a42e316 asyncio: pep8-ify the code. 2014-02-18 22:56:15 -05:00
Guido van Rossum b58f053e48 asyncio: Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue #20566. 2014-02-12 17:58:19 -08:00
Victor Stinner eb74876e99 asyncio, Tulip issue 131: as_completed() and wait() now raises a TypeError if
the list of futures is not a list but a Future, Task or coroutine object
2014-02-11 11:54:08 +01:00
Victor Stinner a125497ea3 asyncio, Tulip issue 126: call_soon(), call_soon_threadsafe(), call_later(),
call_at() and run_in_executor() now raise a TypeError if the callback is a
coroutine function.
2014-02-11 11:34:30 +01:00
Guido van Rossum 313f829ce8 asyncio: Test fix. 2014-02-08 17:35:09 -08:00
Yury Selivanov 622be340fd asyncio.tasks: Fix as_completed, gather & wait to work with duplicate coroutines 2014-02-06 22:06:16 -05:00
Guido van Rossum a849be9c64 asyncio: Fix misc whitespace issues. 2014-01-30 16:05:28 -08:00
Guido van Rossum 48c66c3dd8 asyncio: wait_for() now accepts None as timeout (Victor Stinner). 2014-01-29 14:30:38 -08:00
Victor Stinner 8dffc456d7 Update asyncio from the Tulip project
Major changes:

- StreamReader.readexactly() now raises an IncompleteReadError if the
  end of stream is reached before we received enough bytes, instead of
  returning less bytes than requested.

- Unit tests use the main asyncio module instead of submodules like events

- _UnixWritePipeTransport now also supports character devices, as
  _UnixReadPipeTransport. Patch written by Jonathan Slenders.

- Export more symbols: BaseEventLoop, BaseProactorEventLoop,
  BaseSelectorEventLoop, Queue and Queue sublasses, Empty, Full
2014-01-25 15:32:06 +01:00
Victor Stinner 421e49b5c1 asyncio: wait_for() now cancels the future on timeout. Patch written by Gustavo
Carneiro.
2014-01-23 17:40:59 +01:00
Guido van Rossum 9ba75db3c5 asyncio: Clean up formatting. 2013-12-19 13:49:32 -08:00
Victor Stinner 4c3c699e62 Close #19967: Thanks to the PEP 442, asyncio.Future can use a destructor in
Python 3.4 to log "uncatched" exceptions, instead of the dedicated
_TracebackLogger class.
2013-12-19 22:42:40 +01:00
Guido van Rossum 1a605ed5a3 asyncio: Add Task.current_task() class method. 2013-12-06 12:57:40 -08:00
Serhiy Storchaka e048addedc Issue #19589: Use specific asserts in asyncio tests. 2013-11-14 23:10:51 +02:00
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00