summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/futures.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) ↵Kumar Aditya2022-01-221-2/+2
| | | | | (GH-30785) Automerge-Triggered-By: GH:asvetlov
* bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951)Chris Jerdonek2020-05-181-5/+21
| | | | | When an asyncio.Task is cancelled, the exception traceback now starts with where the task was first interrupted. Previously, the traceback only had "depth one."
* bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979)Chris Jerdonek2020-05-151-3/+8
|
* bpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)Batuhan Taşkaya2019-12-071-0/+3
| | | https://bugs.python.org/issue38978
* bpo-38785: Prevent asyncio from crashing (GH-17144)Andrew Svetlov2019-11-131-1/+4
| | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-12/+21
|
* bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)Yury Selivanov2018-05-281-0/+3
|
* bpo-32643: Drop support for a few private Task and Future APIs. (#5293)Yury Selivanov2018-01-241-4/+4
| | | | | | | | Specifically, it's not possible to subclass Task/Future classes and override the following methods: * Future._schedule_callbacks * Task._step * Task._wakeup
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-231-6/+11
|
* bpo-31721: Allow Future._log_traceback to only be set to False (#5009)Yury Selivanov2017-12-251-6/+16
|
* bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)Yury Selivanov2017-12-251-3/+4
|
* bpo-32415: Add asyncio.Task.get_loop() and Future.get_loop() (#4992)Yury Selivanov2017-12-231-2/+18
|
* bpo-32311: Implement asyncio.create_task() shortcut (#4848)Andrew Svetlov2017-12-151-1/+3
| | | | | * Implement functionality * Add documentation
* bpo-32258: Replace 'yield from' to 'await' in asyncio docs (#4779)Andrew Svetlov2017-12-111-2/+3
| | | | | | * Replace 'yield from' to 'await' in asyncio docs * Fix docstrings
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-101-8/+10
|
* asyncio: Remove asyncio/compat.py (#4606)Victor Stinner2017-11-281-3/+1
| | | | | | | | | | 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 ;-)
* asyncio: Remove unused Future._tb_logger attribute (#4596)Victor Stinner2017-11-271-8/+1
| | | | It was only used on Python 3.3, now only Future._log_traceback is used.
* bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)Antoine Pitrou2017-11-071-1/+1
| | | | * bpo-31970: Reduce performance overhead of asyncio debug mode.
* bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)Antoine Pitrou2017-11-071-1/+3
|
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)Yury Selivanov2017-06-111-0/+1
|
* bpo-29617: Remove Python 3.3 support from asyncio (GH-232)INADA Naoki2017-04-251-106/+16
|
* Issue #28544: Implement asyncio.Task in C.Yury Selivanov2016-10-281-71/+18
| | | | | | | | 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).
* asyncio: Increase asyncio.Future test coverage; test both implementations.Yury Selivanov2016-10-241-2/+7
| | | | | Also, add 'isfuture' to 'asyncio.futures.__all__', so that it's exposed as 'asyncio.isfuture'.
* Issue #28448: Fix C implemented asyncio.Future didn't work on WindowsINADA Naoki2016-10-211-4/+4
|
* Issue #28452: Remove _asyncio._init_module functionINADA Naoki2016-10-181-15/+8
|
* Issue #28428: Rename _futures module to _asyncio.INADA Naoki2016-10-151-3/+3
| | | | It will have more speedup functions or classes other than asyncio.Future.
* Issue #26801: Added C implementation of asyncio.Future.INADA Naoki2016-10-091-37/+57
| | | | Original patch by Yury Selivanov.
* Merge asyncio upstream.Guido van Rossum2016-09-091-6/+18
|
* Rename Future._blocking to _asyncio_future_blocking.Guido van Rossum2016-09-091-2/+10
| | | | | | | | | | | | 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.
* Issue #27041: asyncio: Add loop.create_future methodYury Selivanov2016-05-161-1/+3
|
* asyncio: Prevent StopIteration from being thrown into a FutureYury Selivanov2016-03-021-0/+3
| | | | Patch by Chris Angelico (issue #26221)
* Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similarMartin Panter2016-02-101-1/+1
| | | | | The original form is incorrect grammar and feels awkward, even though the meaning is clear.
* asyncio: Cleanup Future APIYury Selivanov2015-11-171-30/+30
| | | | See https://github.com/python/asyncio/pull/292 for details.
* Issue #25304: Add asyncio.run_coroutine_threadsafe(). By Vincent Michel.Guido van Rossum2015-10-031-16/+58
|
* asyncio: Add asyncio.compat moduleVictor Stinner2015-07-251-6/+4
| | | | | Move compatibility helpers for the different Python versions to a new asyncio.compat module.
* asyncio: Support PEP 492. Issue #24017.Yury Selivanov2015-05-121-0/+4
|
* Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine functions ↵Guido van Rossum2015-05-031-1/+1
| | | | without __name__.
* Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transportVictor Stinner2015-01-291-3/+3
| | | | is not explicitly closed. Close also explicitly transports in test_sslproto.
* Issue #23209: Break some reference cycles in asyncio. Patch written by MartinVictor Stinner2015-01-091-1/+1
| | | | Richard.
* asyncio: sync with TulipVictor Stinner2015-01-091-2/+0
| | | | | | | * Tulip issue 184: FlowControlMixin constructor now get the event loop if the loop parameter is not set. Add unit tests to ensure that constructor of StreamReader and StreamReaderProtocol classes get the event loop. * Remove outdated TODO/XXX
* asyncio: Initialize more Future and Task attributes in the class definition toVictor Stinner2014-12-041-2/+1
| | | | avoid attribute errors in destructors.
* Removed duplicated words in in comments and docs.Serhiy Storchaka2014-12-011-1/+1
|
* asyncio: Fix formatting of the "Future exception was never retrieved" inVictor Stinner2014-11-201-3/+4
| | | | release mode
* asyncio: sync with TulipVictor Stinner2014-07-291-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | * _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
* Closes #21886, #21447: Fix a race condition in asyncio when setting the resultVictor Stinner2014-07-051-0/+6
| | | | | of a Future with call_soon(). Add an helper, a private method, to set the result only if the future was not cancelled.
* asyncio, Tulip issue 137: In debug mode, save traceback where Future, Task andVictor Stinner2014-06-271-10/+19
| | | | | | | | | | | 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 177: Rewite repr() of Future, Task, Handle and TimerHandleVictor Stinner2014-06-251-16/+32
| | | | | | - 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: Log an error if a Task is destroyed while it is still pendingVictor Stinner2014-06-241-0/+3
|
* asyncio: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-201-1/+0
|
* asyncio: New error handling API. Issue #20681.Yury Selivanov2014-02-181-7/+15
|