summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_tasks.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)INADA Naoki2018-02-131-0/+14
| | | (cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
* [3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. ↵Antoine Pitrou2017-11-071-1/+1
| | | | | | (GH-4314) (#4322) * bpo-31970: Reduce performance overhead of asyncio debug mode.. (cherry picked from commit 921e9432a1461bbf312c9c6dcc2b916be6c05fa0)
* bpo-31061: fix crash in asyncio speedup module (GH-2984)INADA Naoki2017-08-021-0/+15
| | | (cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method was called. ↵Yury Selivanov2017-06-111-0/+19
| | | | (#2109)
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)INADA Naoki2017-05-111-0/+18
| | | | | | | | | | | | | | when there are no more `await` or `yield (from)` before return in coroutine, cancel was ignored. example: async def coro(): asyncio.Task.current_task().cancel() return 42 ... res = await coro() # should raise CancelledError (cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
* bpo-29271: Fix Task.current_task and Task.all_tasks to accept None. (#406)Yury Selivanov2017-03-031-0/+17
|
* Issue #28843: Fix asyncio C Task to handle exceptions __traceback__.Yury Selivanov2016-12-011-0/+15
|
* Merge 3.5 (issue #28703)Yury Selivanov2016-11-151-0/+2
|\
| * Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.Yury Selivanov2016-11-151-0/+2
| |
* | Merge 3.5 (issue #28613)Yury Selivanov2016-11-041-0/+5
|\ \ | |/
| * Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-041-0/+5
| | | | | | | | when called from coroutines or callbacks.
* | Issue #28544: Implement asyncio.Task in C.Yury Selivanov2016-10-281-134/+305
|/ | | | | | | | This implementation provides additional 10-20% speed boost for asyncio programs. The patch also fixes _asynciomodule.c to use Arguments Clinic, and makes '_schedule_callbacks' an overridable method (as it was in 3.5).
* Issue #26923: Fix asyncio.Gather to refuse being cancelled once all children ↵Yury Selivanov2016-10-211-0/+30
| | | | | | are done. Patch by Johannes Ebke.
* Issue #27972: Prohibit Tasks to await on themselves.Yury Selivanov2016-10-091-0/+11
|
* Misc asyncio improvements from upstreamGuido van Rossum2016-09-301-0/+31
|
* asyncio: Remove asyncio.timeout() context manager.Yury Selivanov2016-06-081-187/+0
| | | | | | | It will probably be added back in Python 3.6, once its compatibility issues are resolved; see [1] for more details. [1] https://mail.python.org/pipermail/async-sig/2016-June/000045.html
* Fix test_asyncio.test_timeout_disable()Victor Stinner2016-04-181-1/+3
| | | | | | | | | | | Issue #26777: Fix random failing of the test on the "AMD64 FreeBSD 9.x 3.5" buildbot: File ".../Lib/test/test_asyncio/test_tasks.py", line 2398, in go self.assertTrue(0.09 < dt < 0.11, dt) AssertionError: False is not true : 0.11902812402695417 Replace "< 0.11" with "< 0.15".
* asyncio: allow None as wait timeoutVictor Stinner2016-04-011-0/+16
| | | | | | Fix GH#325: Allow to pass None as a timeout value to disable timeout logic. Change written by Andrew Svetlov and merged by Guido van Rossum.
* asyncio: Fix @coroutine to recognize CoroWrapper (issue #25647)Yury Selivanov2016-03-021-0/+24
| | | | Patch by Vladimir Rutsky.
* test_asyncio: fix test_timeout_time()Victor Stinner2016-02-011-1/+2
| | | | | Accept time delta up to 0.12 second, instead of 0.11, for the "AMD64 FreeBSD 9.x" buildbot slave.
* Sync with asyncio repoAndrew Svetlov2016-01-111-0/+169
|
* asyncio/tests: Fix a ResourceWarning due to unclosed loopYury Selivanov2015-12-171-0/+4
|
* asyncio: Make Tasks check if Futures are attached to the same event loopYury Selivanov2015-12-111-0/+15
| | | | See https://github.com/python/asyncio/pull/303 for details
* asyncio: Fix sporadic failing unittests in debug modeYury Selivanov2015-11-131-14/+18
|
* asyncio: Optimize asyncio.sleep(0)Yury Selivanov2015-11-051-0/+24
|
* Docs and one small improvement for issue #25304, by Vincent Michel.Guido van Rossum2015-10-051-0/+21
|
* Issue #25304: Add asyncio.run_coroutine_threadsafe(). By Vincent Michel.Guido van Rossum2015-10-031-0/+67
|
* asyncio: ensure_future() now understands awaitablesYury Selivanov2015-10-021-0/+18
|
* Issue #24867: Fix Task.get_stack() for 'async def' coroutinesYury Selivanov2015-08-141-0/+32
|
* Issue #24400: Fix CoroWrapper for 'async def' coroutinesYury Selivanov2015-06-241-1/+2
|
* asyncio: Support PEP 492. Issue #24017.Yury Selivanov2015-05-121-2/+2
|
* asyncio: async() function is deprecated in favour of ensure_future().Yury Selivanov2015-05-111-21/+27
|
* Sync asyncio changes from the main repo.Yury Selivanov2015-05-111-2/+7
|
* Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine functions ↵Guido van Rossum2015-05-031-21/+44
| | | | without __name__.
* Closes #23219: cancelling asyncio.wait_for() now cancels the taskVictor Stinner2015-01-151-0/+27
|
* asyncio: Truncate to 80 columnsVictor Stinner2015-01-081-4/+8
|
* asyncio: sync with TulipVictor Stinner2014-12-261-5/+5
| | | | | * Fix pyflakes warnings: remove unused imports and variables * asyncio.test_support now uses test.support and test.script_helper if available
* asyncio: sync with TulipVictor Stinner2014-12-181-2/+6
|
* asyncio.test_tasks: Fix test_env_var_debug to use correct asyncio moduleYury Selivanov2014-09-251-4/+11
|
* asyncio, Tulip issue 201: Fix a race condition in wait_for()Victor Stinner2014-08-281-0/+15
| | | | | | 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.
* asyncio: sync with TulipVictor Stinner2014-07-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * _WaitHandleFuture.cancel() now notify IocpProactor through the overlapped object that the wait was cancelled. * Optimize IocpProactor.wait_for_handle() gets the result if the wait is signaled immediatly. * Enhance representation of Future and Future subclasses - 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. * Fix repr(_WaitHandleFuture) * _WaitHandleFuture and _OverlappedFuture: hide frames of internal calls in the source traceback. * Cleanup ProactorIocp._poll(): set the timeout to 0 after the first call to GetQueuedCompletionStatus() * test_locks: close the temporary event loop and check the condition lock * Remove workaround in test_futures, no more needed
* asyncio: test_as_completed(): disable "slow callback" warningVictor Stinner2014-07-161-0/+2
|
* Issue #21163: Fix "destroy pending task" warning in test_wait_errors()Victor Stinner2014-07-161-4/+7
|
* asyncio: sync with TulipVictor Stinner2014-07-111-5/+4
| | | | | | | | | | * Tulip issue #182: Improve logs of BaseEventLoop._run_once() - Don't log non-blocking poll - Only log polling with a timeout if it gets events or if it timed out after more than 1 second. * Fix some pyflakes warnings: remove unused imports
* asyncio: sync with TulipVictor Stinner2014-07-101-8/+3
| | | | | | | - CoroWrapper.__del__() now reuses repr(CoroWrapper) to log the "... was never yielded from" warning - Improve CoroWrapper: copy also the qualified name on Python 3.4, not only on Python 3.5+
* asyncio: sync with TulipVictor Stinner2014-07-101-7/+42
| | | | | | | - repr(Task) and repr(CoroWrapper) now also includes where these objects were 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. - Fix create_task(): truncate the traceback to hide the call to create_task().
* asyncio: sync with TulipVictor Stinner2014-07-081-0/+3
| | | | | | | | | | | - Tulip issue 185: Add a create_task() method to event loops. 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. - tests: fix a warning - fix typo in the name of a test function - Update AbstractEventLoop: add new event loop methods; update also the unit test
* Closes #21886, #21447: Fix a race condition in asyncio when setting the resultVictor Stinner2014-07-051-0/+4
| | | | | of a Future with call_soon(). Add an helper, a private method, to set the result only if the future was not cancelled.
* asyncio: sync with TulipVictor Stinner2014-07-021-0/+11
| | | | | | | | | | * _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
* asyncio: Fix test_sleep_cancel(): call_later() mock has no self parameterVictor Stinner2014-07-011-2/+2
|