aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/tasks.py
Commit message (Collapse)AuthorAge
* bpo-32272: Remove asyncio.async() function. (#4784)Yury Selivanov2017-12-11
|
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-10
|
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert asyncio/tasks.py to async/await * Convert asyncio/queues.py to async/await * Convert asyncio/test_utils.py to async/await * Convert asyncio/base_subprocess.py to async/await * Convert asyncio/subprocess.py to async/await * Convert asyncio/streams.py to async/await * Fix comments * Convert asyncio/locks.py to async/await * Convert asyncio.sleep to async def * Add a comment * Add missing news * Convert stubs from AbstrctEventLoop to async functions * Convert subprocess_shell/subprocess_exec * Convert connect_read_pipe/connect_write_pip to async/await syntax * Convert create_datagram_endpoint * Convert create_unix_server/create_unix_connection * Get rid of old style coroutines in unix_events.py * Convert selector_events.py to async/await * Convert wait_closed and create_connection * Drop redundant line * Convert base_events.py * Code cleanup * Drop redundant comments * Fix indentation * Add explicit tests for compatibility between old and new coroutines * Convert windows event loop to use async/await * Fix double awaiting of async function * Convert asyncio/locks.py * Improve docstring * Convert tests to async/await * Convert more tests * Convert more tests * Convert more tests * Convert tests * Improve test
* asyncio: Remove asyncio/compat.py (#4606)Victor Stinner2017-11-28
| | | | | | | | | | The asyncio/compat.py file was written to support Python < 3.5 and Python < 3.5.2. But Python 3.5 doesn't accept bugfixes anymore, only security fixes. There is no more need to backport bugfixes to Python 3.5, and so no need to have a single code base for Python 3.5, 3.6 and 3.7. Say hello (again) to "async" and "await", who became real keywords in Python 3.7 ;-)
* bpo-31556: asyncio.wait_for can cancel futures faster with timeout <= 0 (#3703)Victor K2017-10-05
|
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)Yury Selivanov2017-06-11
|
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097)INADA Naoki2017-05-11
| | | | | | | | | | | | 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
* bpo-29617: Remove Python 3.3 support from asyncio (GH-232)INADA Naoki2017-04-25
|
* bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future ↵Charles Renwick2017-04-21
| | | | (GH-1170)
* Issue #29314: Merge with 3.5Mariatta Wijaya2017-02-06
|\
| * Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation WarningMariatta Wijaya2017-02-06
| |
* | Issue #28544: Implement asyncio.Task in C.Yury Selivanov2016-10-28
|/ | | | | | | | 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-21
| | | | | | are done. Patch by Johannes Ebke.
* Issue #27972: Prohibit Tasks to await on themselves.Yury Selivanov2016-10-09
|
* Misc asyncio improvements from upstreamGuido van Rossum2016-09-30
|
* Another asyncio sync.Yury Selivanov2016-09-15
|
* Merge asyncio upstream.Guido van Rossum2016-09-09
|
* Rename Future._blocking to _asyncio_future_blocking.Guido van Rossum2016-09-09
| | | | | | | | | | | | This is now an official "protected" API that can be used to write classes that are duck-type-compatible with Future without subclassing it. (For that purpose I also changed isinstance(result, Future) to check for this attribute instead.) Hopefully Amber Brown can use this to make Twisted.Deferred compatible with asyncio.Future. Tests and docs are TBD.
* asyncio: Remove asyncio.timeout() context manager.Yury Selivanov2016-06-08
| | | | | | | 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
* Issue #27041: asyncio: Add loop.create_future methodYury Selivanov2016-05-16
|
* asyncio: allow None as wait timeoutVictor Stinner2016-04-01
| | | | | | 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.
* Sync with asyncioAndrew Svetlov2016-01-11
|
* Sync with asyncio repoAndrew Svetlov2016-01-11
|
* asyncio: Make Tasks check if Futures are attached to the same event loopYury Selivanov2015-12-11
| | | | See https://github.com/python/asyncio/pull/303 for details
* asyncio: Drop "value" parameter from Task._step method.Yury Selivanov2015-11-20
|
* asyncio: Cleanup Future APIYury Selivanov2015-11-17
| | | | See https://github.com/python/asyncio/pull/292 for details.
* asyncio: Sync with githubYury Selivanov2015-11-17
|
* asyncio: Optimize Task._wakeupYury Selivanov2015-11-16
| | | | See https://github.com/python/asyncio/pull/289 for details.
* asyncio: Optimize asyncio.sleep(0)Yury Selivanov2015-11-05
|
* Docs and one small improvement for issue #25304, by Vincent Michel.Guido van Rossum2015-10-05
|
* Issue #25304: Add asyncio.run_coroutine_threadsafe(). By Vincent Michel.Guido van Rossum2015-10-03
|
* asyncio: ensure_future() now understands awaitablesYury Selivanov2015-10-02
|
* Issue #24867: Fix Task.get_stack() for 'async def' coroutinesYury Selivanov2015-08-14
|
* Revert da29a94367b2Yury Selivanov2015-08-02
|
* asyncio: Fix code styleYury Selivanov2015-08-02
|
* asyncio: sync with githubVictor Stinner2015-07-25
| | | | | | | | | * Fix ResourceWarning warnings in test_streams * Return True from StreamReader.eof_received() to fix http://bugs.python.org/issue24539 (but still needs a unittest). Add StreamReader.__repr__() for easy debugging. * remove unused imports * Issue #234: Drop JoinableQueue on Python 3.5+
* asyncio: Add asyncio.compat moduleVictor Stinner2015-07-25
| | | | | Move compatibility helpers for the different Python versions to a new asyncio.compat module.
* asyncio: Drop some useless code from tasks.py.Yury Selivanov2015-05-28
| | | | See also issue 24017.
* asyncio: Support PEP 492. Issue #24017.Yury Selivanov2015-05-11
|
* asyncio: async() function is deprecated in favour of ensure_future().Yury Selivanov2015-05-11
|
* asyncio: sync with TulipVictor Stinner2015-01-29
| | | | | | | | | * Cleanup gather(): use cancelled() method instead of using private Future attribute * Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading when connection_made() has been called. * Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the transport on error. In debug mode, log errors using call_exception_handler()
* Closes #23219: cancelling asyncio.wait_for() now cancels the taskVictor Stinner2015-01-15
|
* asyncio: sync with TulipVictor Stinner2015-01-09
| | | | | | | | * Document why set_result() calls are safe * Cleanup gather(). Use public methods instead of hacks to consume the exception of a future. * sock_connect(): pass directly the fd to _sock_connect_done instead of the socket.
* asyncio: Truncate to 80 columnsVictor Stinner2015-01-09
|
* asyncio: Initialize more Future and Task attributes in the class definition toVictor Stinner2014-12-04
| | | | avoid attribute errors in destructors.
* Closes #22475: asyncio doc, fix Task.get_stack() docVictor Stinner2014-12-02
|
* Apply asyncio Task English fixes to docstrings as well.R David Murray2014-09-24
| | | | Also fixed the phrasing in a comment.
* asyncio, Tulip issue 201: Fix a race condition in wait_for()Victor Stinner2014-08-28
| | | | | | 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-29
| | | | | | | | | | | | | | | | | | | | | | | | * _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
* Issue #21163: Fix "destroy pending task" warning in test_wait_errors()Victor Stinner2014-07-16
|