Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Cleanup gather(): use cancelled() method instead of using private Future | Victor Stinner | 2015-01-29 | 1 | -1/+1 |
| | | | | attribute | ||||
* | Python issue #23219: cancelling wait_for() now cancels the task | Victor Stinner | 2015-01-15 | 1 | -4/+8 |
| | |||||
* | Cleanup gather() | Victor Stinner | 2015-01-09 | 1 | -4/+7 |
| | | | | Use public methods instead of hacks to consume the exception of a future. | ||||
* | Truncate to 80 columns | Victor Stinner | 2015-01-09 | 1 | -1/+1 |
| | |||||
* | Python issue #22475: fix Task.get_stack() doc | Victor Stinner | 2014-12-04 | 1 | -1/+1 |
| | |||||
* | Initialize more Future and Task attributes in the class definition to avoid | Victor Stinner | 2014-12-04 | 1 | -3/+4 |
| | | | | attribute errors in destructors. | ||||
* | tasks.py: Sync comments updates from cpython tree | Yury Selivanov | 2014-09-24 | 1 | -9/+10 |
| | |||||
* | Tulip issue #201: Fix a race condition in wait_for() | Victor Stinner | 2014-08-28 | 1 | -6/+9 |
| | | | | | | Don't raise a TimeoutError if we reached the timeout and the future completed in the same iteration of the event loop. A side effect of the bug is that Queue.get() looses items. | ||||
* | Enhance representation of Future and Future subclasses | Victor Stinner | 2014-07-29 | 1 | -19/+8 |
| | | | | | | | | | | * Add "created at filename:lineno" in the representation * Add Future._repr_info() method which can be more easily overriden than Future.__repr__(). It should now be more easy to enhance Future representation without having to modify each subclass. For example, _OverlappedFuture and _WaitHandleFuture get the new "created at" information. * Use reprlib to format Future result, and function arguments when formatting a callback, to limit the length of the representation. | ||||
* | Python issue 21163: Fix "destroy pending task" warning in test_wait_errors() | Victor Stinner | 2014-07-16 | 1 | -2/+2 |
| | |||||
* | Python issue 21163: Ignore "destroy pending task" warnings for private tasks in | Victor Stinner | 2014-07-16 | 1 | -11/+23 |
| | | | | asyncio.gather(). | ||||
* | Fix some pyflakes warnings: remove unused imports | Victor Stinner | 2014-07-11 | 1 | -1/+0 |
| | |||||
* | Improve CoroWrapper: copy also the qualified name on Python 3.4, not only on | Victor Stinner | 2014-07-11 | 1 | -1/+0 |
| | | | | Python 3.5+ | ||||
* | repr(Task) and repr(CoroWrapper) now also includes where these objects were | Victor Stinner | 2014-07-10 | 1 | -1/+6 |
| | | | | | | | created. If the coroutine is not a generator (don't use "yield from"), use the location of the function, not the location of the coro() wrapper. | ||||
* | Tulip issue #185: Add a create_task() method to event loops | Victor Stinner | 2014-07-08 | 1 | -1/+3 |
| | | | | | | | | | The create_task() method can be overriden in custom event loop to implement their own task class. For example, greenio and Pulsar projects use their own task class. The create_task() method is now preferred over creating directly task using the Task class. | ||||
* | Python issue 21447, 21886: Fix a race condition when setting the result of a | Victor Stinner | 2014-07-05 | 1 | -1/+2 |
| | | | | | Future with call_soon(). Add an helper, an private method, to set the result only if the future was not cancelled. | ||||
* | Backed out changeset b288da71fb40 | Victor Stinner | 2014-07-03 | 1 | -4/+1 |
| | | | | Oops, I wanted to send this patch for review before | ||||
* | Add asyncio.tasks.task_factory variable | Victor Stinner | 2014-07-03 | 1 | -1/+4 |
| | | | | | | | In the greenio project, Task._step() should not create Task objects but GreenTask to control how tasks are executed. Luca Sbardella already asked this feature for its Pulsar project to support coroutines using yield instead of yield-from. | ||||
* | repr(Task): include also the future the task is waiting for | Victor Stinner | 2014-07-01 | 1 | -0/+3 |
| | |||||
* | Python issue #21163: BaseEventLoop.run_until_complete() and | Victor Stinner | 2014-06-30 | 1 | -1/+4 |
| | | | | | test_utils.run_briefly() don't log the "destroy pending task" message anymore. The log is redundant for run_until_complete() and useless in run_briefly(). | ||||
* | Move coroutine code in the new module asyncio.coroutines | Victor Stinner | 2014-06-29 | 1 | -135/+8 |
| | |||||
* | Tulip issue #137: In debug mode, save traceback where Future, Task and Handle | Victor Stinner | 2014-06-27 | 1 | -3/+11 |
| | | | | | | | | | | | 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. | ||||
* | Tulip issue #137: In debug mode, add the traceback where the coroutine object | Victor Stinner | 2014-06-27 | 1 | -7/+10 |
| | | | | was created to the "coroutine ... was never yield from" log | ||||
* | Tulip issue #177: Rewite repr() of Future, Task, Handle and TimerHandle | Victor Stinner | 2014-06-25 | 1 | -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 | ||||
* | repr(Task) now also contains the line number even if the coroutine is done: use | Victor Stinner | 2014-06-24 | 1 | -2/+4 |
| | | | | | | | | 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. | ||||
* | Log an error if a Task is destroyed while it is still pending, but only on | Victor Stinner | 2014-06-24 | 1 | -0/+13 |
| | | | | Python 3.4 and newer. | ||||
* | Set __qualname__ attribute of CoroWrapper in @coroutine decorator | Victor Stinner | 2014-06-18 | 1 | -4/+6 |
| | | | | | | | | | - 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 | ||||
* | Task.__repr__() now also handles CoroWrapper | Victor Stinner | 2014-06-17 | 1 | -1/+1 |
| | |||||
* | Issue #173: Enhance repr(Handle) and repr(Task) | Victor Stinner | 2014-06-12 | 1 | -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. | ||||
* | wait(): mention that the future sequence must not be empty | Victor Stinner | 2014-06-10 | 1 | -0/+2 |
| | |||||
* | Rephrase Task.cancel docstring | Victor Stinner | 2014-06-02 | 1 | -1/+1 |
| | |||||
* | Fix docstring typo: CancellationError should be CancelledError. | Guido van Rossum | 2014-05-28 | 1 | -1/+1 |
| | |||||
* | Add __weakref__ slots to Handle and CoroWrapper. Fixes issue #166. | Guido van Rossum | 2014-04-27 | 1 | -1/+1 |
| | |||||
* | Be careful accessing instance variables in __del__ (CPython issue 21340). | Guido van Rossum | 2014-04-27 | 1 | -1/+3 |
| | |||||
* | Add gi_{frame,running,code} properties to CoroWrapper. Fixes issue #163. | Guido van Rossum | 2014-04-15 | 1 | -0/+12 |
| | |||||
* | tasks: Make sure CoroWrapper.send proxies one argument correctly | Yury Selivanov | 2014-04-15 | 1 | -0/+2 |
| | |||||
* | tasks: Fix CoroWrapper to workaround yield-from bug in CPython | Yury Selivanov | 2014-04-14 | 1 | -1/+4 |
| | |||||
* | Fix bad grammar. | Guido van Rossum | 2014-03-31 | 1 | -2/+2 |
| | |||||
* | Document Task.cancel() properly. | Guido van Rossum | 2014-03-31 | 1 | -0/+19 |
| | |||||
* | Issue #158: Task._step() now also sets self to None if an exception is raised. | Victor Stinner | 2014-03-04 | 1 | -1/+1 |
| | | | | self is set to None to break a reference cycle. | ||||
* | asyncio: remove unused imports and unused variables noticed by pyflakes | Victor Stinner | 2014-02-20 | 1 | -2/+0 |
| | |||||
* | Issue #136: Add get/set_debug() methods to BaseEventLoopTests. Add also a | Victor Stinner | 2014-02-19 | 1 | -1/+4 |
| | | | | | PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module. | ||||
* | Fix spelling & typos | Yury Selivanov | 2014-02-18 | 1 | -1/+1 |
| | |||||
* | Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue ↵ | Guido van Rossum | 2014-02-12 | 1 | -20/+33 |
| | | | | #127. | ||||
* | Issue #131: as_completed() and wait() now raises a TypeError if the list of | Victor Stinner | 2014-02-11 | 1 | -0/+4 |
| | | | | futures is not a list but a Future, Task or coroutine object | ||||
* | tasks: Fix as_completed, gather & wait to work with duplicate coroutines. ↵ | Yury Selivanov | 2014-02-06 | 1 | -3/+4 |
| | | | | Issue #114 | ||||
* | tasks.gather: Fix docstring | Yury Selivanov | 2014-02-06 | 1 | -1/+1 |
| | |||||
* | Move async() call back to its original position. Issue 117. | Guido van Rossum | 2014-01-28 | 1 | -1/+1 |
| | |||||
* | wait_for() now accepts None as timeout | Victor Stinner | 2014-01-28 | 1 | -1/+4 |
| | |||||
* | wait_for() now cancels the future on timeout. Patch written by Gustavo | Victor Stinner | 2014-01-22 | 1 | -2/+4 |
| | | | | Carneiro. |