summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
Commit message (Collapse)AuthorAgeFilesLines
...
* asyncio: sync with TulipVictor Stinner2014-07-021-0/+3
| | | | | | | | | | * _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode, not in read mode * Examples: close the event loop at exit * More reliable CoroWrapper.__del__. If the constructor is interrupted by KeyboardInterrupt or the coroutine objet is destroyed lately, some the _source_traceback attribute doesn't exist anymore. * repr(Task): include also the future the task is waiting for
* Issue #21163: BaseEventLoop.run_until_complete() and test_utils.run_briefly()Victor Stinner2014-06-301-1/+4
| | | | | don't log the "destroy pending task" message anymore. The log is redundant for run_until_complete() and useless in run_briefly().
* asyncio: sync with Tulip, add a new asyncio.coroutines moduleVictor Stinner2014-06-281-135/+8
|
* asyncio, Tulip issue 137: In debug mode, save traceback where Future, Task andVictor Stinner2014-06-271-3/+11
| | | | | | | | | | | Handle objects are created. Pass the traceback to call_exception_handler() in the 'source_traceback' key. The traceback is truncated to hide internal calls in asyncio, show only the traceback from user code. Add tests for the new source_traceback, and a test for the 'Future/Task exception was never retrieved' log.
* asyncio, Tulip issue 137: In debug mode, add the traceback where the coroutineVictor Stinner2014-06-271-7/+10
| | | | object was created to the "coroutine ... was never yield from" log
* asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and TimerHandleVictor Stinner2014-06-251-20/+31
| | | | | | - Uniformize repr() output to format "<Class ...>" - On Python 3.5+, repr(Task) uses the qualified name instead of the short name of the coroutine
* asyncio: repr(Task) now also contains the line number even if the coroutine isVictor Stinner2014-06-241-2/+4
| | | | | | | | done: use the first line number of the code object instead of the current line number of the generator frame. The name of the coroutine is not enough because many coroutines may have the same name. It's a common case in asyncio tests for example.
* asyncio: Log an error if a Task is destroyed while it is still pendingVictor Stinner2014-06-241-0/+13
|
* asyncio: Set __qualname__ attribute of CoroWrapper in @coroutine decorator onVictor Stinner2014-06-171-4/+6
| | | | | | | | | | | Python 3.5 - Drop __slots__ optimization of CoroWrapper to be able to set the __qualname__ attribute. - Add tests on __name__, __qualname__ and __module__ of a coroutine function and coroutine object. - Fix test_tasks when run in debug mode (PYTHONASYNCIODEBUG env var set) on Python 3.3 or 3.4
* asyncio: Task.__repr__() now also handles CoroWrapperVictor Stinner2014-06-161-1/+1
|
* asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)Victor Stinner2014-06-121-1/+9
| | | | | | | | | | repr(Handle) is shorter for function: "foo" instead of "<function foo at 0x...>". It now also includes the source of the callback, filename and line number where it was defined, if available. repr(Task) now also includes the current position in the code, filename and line number, if available. If the coroutine (generator) is done, the line number is omitted and "done" is added.
* Issue #21596: asyncio.wait(): mention that the sequence of futures must notVictor Stinner2014-06-101-0/+2
| | | | be empty.
* Issue #21601: Document asyncio.Task.cancel(). Initial patch written by VajraskyVictor Stinner2014-06-021-2/+2
| | | | Kok.
* asyncio: Add __weakref__ slots to Handle and CoroWrapper. Upstream issue #166.Guido van Rossum2014-04-271-1/+1
|
* asyncio: Be careful accessing instance variables in __del__ (closes #21340).Guido van Rossum2014-04-271-1/+3
|
* asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163).Guido van Rossum2014-04-151-0/+12
|
* asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctlyYury Selivanov2014-04-151-0/+2
| | | | Issue #21209.
* asyncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1Yury Selivanov2014-04-151-1/+4
| | | | Closes issue #21209.
* asyncio: Document Task.cancel() properly.Victor Stinner2014-04-071-0/+19
|
* asyncio, Tulip issue 158: Task._step() now also sets self to None if anVictor Stinner2014-03-041-1/+1
| | | | exception is raised. self is set to None to break a reference cycle.
* asyncio: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-201-2/+0
|
* asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.Victor Stinner2014-02-191-1/+4
| | | | | | Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module.
* asyncio: Fix spelling and typos.Yury Selivanov2014-02-191-1/+1
| | | | Thanks to Vajrasky Kok for discovering some of them.
* asyncio: Change as_completed() to use a Queue, to avoid O(N**2) behavior. ↵Guido van Rossum2014-02-131-20/+33
| | | | Fixes issue #20566.
* asyncio, Tulip issue 131: as_completed() and wait() now raises a TypeError ifVictor Stinner2014-02-111-0/+4
| | | | the list of futures is not a list but a Future, Task or coroutine object
* asyncio.tasks: Fix as_completed, gather & wait to work with duplicate coroutinesYury Selivanov2014-02-071-3/+4
|
* asyncio.tasks.gather: Fix docstringYury Selivanov2014-02-061-1/+1
|
* asyncio: wait_for() now accepts None as timeout (Victor Stinner).Guido van Rossum2014-01-291-0/+3
|
* asyncio: wait_for() now cancels the future on timeout. Patch written by GustavoVictor Stinner2014-01-231-2/+4
| | | | Carneiro.
* asyncio: Reincarnate CoroWrapper's docstring as a comment.Guido van Rossum2014-01-161-0/+2
|
* asyncio: Fix CoroWrapper (fix my previous commit)Victor Stinner2014-01-161-3/+1
| | | | Add __name__ and __doc__ to __slots__
* asyncio: Fix a typo in CoroWrapperVictor Stinner2014-01-161-1/+1
| | | | __slot__ => __slots__
* Export asyncio.iscoroutine[function].Guido van Rossum2013-12-281-0/+1
|
* asyncio: Add Task.current_task() class method.Guido van Rossum2013-12-061-0/+20
|
* asyncio: Add 'shield' to __all__.Guido van Rossum2013-11-291-1/+1
|
* asyncio: Fold some long lines.Guido van Rossum2013-11-011-2/+3
|
* Rename the logger to plain "logger".Guido van Rossum2013-10-171-3/+3
|
* Initial checkin of asyncio package (== Tulip, == PEP 3156).Guido van Rossum2013-10-171-0/+636