summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_futures.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38785: Prevent asyncio from crashing (GH-17144)Andrew Svetlov2019-11-131-0/+39
| | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785
* bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz2018-12-171-0/+7
| | | | (GH-11175)
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-021-0/+4
| | | | tests (GH-7328)
* bpo-32643: Drop support for a few private Task and Future APIs. (#5293)Yury Selivanov2018-01-241-4/+0
| | | | | | | | 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-4/+10
|
* bpo-31721: Allow Future._log_traceback to only be set to False (#5009)Yury Selivanov2017-12-251-0/+5
|
* bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)Yury Selivanov2017-12-251-1/+2
|
* bpo-32415: Add asyncio.Task.get_loop() and Future.get_loop() (#4992)Yury Selivanov2017-12-231-0/+1
|
* bpo-32348: Optimize asyncio.Future schedule/add/remove callback. (#4907)Yury Selivanov2017-12-181-21/+138
|
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-111-5/+2
|
* bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)Serhiy Storchaka2017-09-031-8/+37
|
* bpo-31250, test_asyncio: fix dangling threads (#3252)Victor Stinner2017-09-011-0/+2
| | | | | | | * Explicitly call shutdown(wait=True) on executors to wait until all threads complete to prevent side effects between tests. * Fix test_loop_self_reading_exception(): don't mock loop.close(). Previously, the original close() method was called rather than the mock, because how set_event_loop() registered loop.close().
* bpo-31061: fix crash in asyncio speedup module (GH-2966)Alexander Mohr2017-08-021-0/+12
|
* bpo-30828: Fix out of bounds write in ↵Yury Selivanov2017-07-051-1/+23
| | | | `asyncio.CFuture.remove_done_callback() (#2569)
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050)Yury Selivanov2017-06-111-0/+8
|
* bpo-28963: Fix out of bound iteration in ↵Yury Selivanov2017-03-031-0/+29
| | | | asyncio.Future.remove_done_callback/C (#408)
* correctly emulate error semantics of gen.throw in FutureIter_throwBenjamin Peterson2016-11-141-0/+9
|
* Merge 3.5 (issue #28634)Yury Selivanov2016-11-071-0/+23
|\
| * Issue #28634: Fix asyncio.isfuture() to support mocksYury Selivanov2016-11-071-0/+23
| |
* | Merge 3.5 (issue #28613)Yury Selivanov2016-11-041-0/+3
|\ \ | |/
| * Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-041-0/+3
| | | | | | | | when called from coroutines or callbacks.
* | asyncio: Increase asyncio.Future test coverage; test both implementations.Yury Selivanov2016-10-241-81/+75
| | | | | | | | | | Also, add 'isfuture' to 'asyncio.futures.__all__', so that it's exposed as 'asyncio.isfuture'.
* | Issue #28492: Fix how StopIteration is raised in _asyncio.FutureYury Selivanov2016-10-201-0/+13
|/
* Merge asyncio upstream.Guido van Rossum2016-09-091-0/+68
|
* Issue #27041: asyncio: Add loop.create_future methodYury Selivanov2016-05-161-8/+9
|
* asyncio/tests: Ensure a gc_collect for __del__ testingYury Selivanov2016-05-131-0/+1
| | | | Patch by Philip Jenvey
* asyncio: Prevent StopIteration from being thrown into a FutureYury Selivanov2016-03-021-0/+4
| | | | Patch by Chris Angelico (issue #26221)
* asyncio: Cleanup Future APIYury Selivanov2015-11-171-4/+7
| | | | 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-2/+0
|
* asyncio: sync with TulipVictor Stinner2015-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | * PipeHandle now uses None instead of -1 for a closed handle * Sort imports in windows_utils. * Fix test_events on Python older than 3.5. Skip SSL tests on the ProactorEventLoop if ssl.MemoryIO is missing * Fix BaseEventLoop._create_connection_transport(). Close the transport if the creation of the transport (if the waiter) gets an exception. * _ProactorBasePipeTransport now sets _sock to None when the transport is closed. * Fix BaseSubprocessTransport.close(). Ignore pipes for which the protocol is not set yet (still equal to None). * TestLoop.close() now calls the close() method of the parent class (BaseEventLoop). * Cleanup BaseSelectorEventLoop: create the protocol on a separated line for readability and ease debugging. * Fix BaseSubprocessTransport._kill_wait(). Set the _returncode attribute, so close() doesn't try to terminate the process. * Tests: explicitly close event loops and transports * UNIX pipe transports: add closed/closing in repr(). Add "closed" or "closing" state in the __repr__() method of _UnixReadPipeTransport and _UnixWritePipeTransport classes.
* asyncio: Truncate to 80 columnsVictor Stinner2015-01-081-8/+16
|
* asyncio: sync with TulipVictor Stinner2014-12-261-1/+1
| | | | | * 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-1/+4
|
* asyncio: Fix formatting of the "Future exception was never retrieved" inVictor Stinner2014-11-201-23/+42
| | | | release mode
* asyncio: sync with TulipVictor Stinner2014-07-291-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | * _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: sync with TulipVictor Stinner2014-07-101-0/+6
| | | | | | | | - Issues #21936, #21163: Fix sporadic failures of test_future_exception_never_retrieved() - Handle.cancel() now clears references to callback and args - In debug mode, repr(Handle) now contains the location where the Handle was created.
* asyncio: sync with TulipVictor Stinner2014-07-081-2/+2
| | | | | | | | | | | - 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/+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: Fix unit tests on Windows, escape filenames in regexVictor Stinner2014-06-271-4/+4
|
* asyncio, Tulip issue 137: In debug mode, save traceback where Future, Task andVictor Stinner2014-06-271-0/+59
| | | | | | | | | | | 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-14/+42
| | | | | | - 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: Refactor tests: add a base TestCase classVictor Stinner2014-06-171-18/+7
|
* asyncio: Replace "unittest.mock" with "mock" in unit testsVictor Stinner2014-02-261-8/+8
| | | | | Use "from unittest import mock". It should simplify my work to merge new tests in Trollius, because Trollius uses "mock" backport for Python 2.
* asyncio: Fix spelling and typos.Yury Selivanov2014-02-191-1/+1
| | | | Thanks to Vajrasky Kok for discovering some of them.
* asyncio: New error handling API. Issue #20681.Yury Selivanov2014-02-181-6/+6
|
* asyncio: Future.set_exception(exc) should instantiate exc if it is a class.Victor Stinner2014-01-311-0/+5
|
* Update asyncio from the Tulip projectVictor Stinner2014-01-251-50/+49
| | | | | | | | | | | | | | | | Major changes: - StreamReader.readexactly() now raises an IncompleteReadError if the end of stream is reached before we received enough bytes, instead of returning less bytes than requested. - Unit tests use the main asyncio module instead of submodules like events - _UnixWritePipeTransport now also supports character devices, as _UnixReadPipeTransport. Patch written by Jonathan Slenders. - Export more symbols: BaseEventLoop, BaseProactorEventLoop, BaseSelectorEventLoop, Queue and Queue sublasses, Empty, Full
* asyncio: Pass cancellation from wrapping Future to wrapped Future. By Saúl ↵Guido van Rossum2013-11-221-0/+18
| | | | Ibarra Corretgé (mostly).
* Rename the logger to plain "logger".Guido van Rossum2013-10-171-6/+6
|
* Initial checkin of asyncio package (== Tulip, == PEP 3156).Guido van Rossum2013-10-171-0/+329