summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-31250: test_asyncio: fix dangling threads (#3517)Victor Stinner2017-09-123-3/+4
| | | | | | | | | | | | | | | | | | | | | | * bpo-31250, test_asyncio: fix dangling threads (#3252) * 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(). (cherry picked from commit 16432beadb8eba079c9786cc0c0eaacfd9fd2f7b) * bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264) Call doCleanups() to close the loop after calling executor.shutdown(wait=True): see TestCase.set_event_loop() of asyncio.test_utils. Replace also gc.collect() with support.gc_collect(). (cherry picked from commit e8a533fbc734af6eeb389202ba6c6e9c2548027f)
* bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076) (#3269)Serhiy Storchaka2017-09-031-8/+37
| | | (cherry picked from commit bca4939d806170c3ca5d05f23710d11a8f1669cf)
* bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) (#3068)Victor Stinner2017-08-101-1/+3
| | | (cherry picked from commit 5659a72f487579be76335c09c8ba8b2f1800adde)
* bpo-31061: fix crash in asyncio speedup module (GH-2984)INADA Naoki2017-08-022-0/+27
| | | (cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
* bpo-31034: Reliable signal handler for test_asyncio (#2867) (#2876)Victor Stinner2017-07-262-31/+45
| | | | | | | | | | * bpo-31034: Reliable signal handler for test_asyncio Don't rely on the current SIGHUP signal handler, make sure that it's set to the "default" signal handler: SIG_DFL. * Add comments (cherry picked from commit 830080913c22a9834d310294b9f7653234dc6a59)
* [3.6] bpo-30828: Fix out of bounds write in ↵Yury Selivanov2017-07-051-1/+23
| | | | | `asyncio.CFuture.remove_done_callback() (GH-2569) (#2590) (cherry picked from commit 833a3b0d3707200daeaccdd218e8f18a190284aa)
* bpo-30280: Cleanup threads in ayncio tests (#2501) (#2511)Victor Stinner2017-06-301-5/+3
| | | | | | | | | | | | | | | | | * bpo-30280: asyncio now cleans up threads asyncio base TestCase now uses threading_setup() and threading_cleanup() of test.support to cleanup threads. * asyncio: Fix TestBaseSelectorEventLoop cleanup bpo-30280: TestBaseSelectorEventLoop of test.test_asyncio.test_selector_events now correctly closes the event loop: cleanup its executor to not leak threads. Don't override the close() method of the event loop, only override the_close_self_pipe() method. (cherry picked from commit b9030674624c181d6e9047cdb14ad65bb6c84c66)
* Revert "[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling ↵Yury Selivanov2017-06-111-34/+0
| | | | | close with certain servers (GH-409) (#2062)" (#2112) This reverts commit 6e14fd2a14cef6ea0709ad234ab41198c2195591.
* bpo-30508: Don't log exceptions if Task/Future "cancel()" method was called. ↵Yury Selivanov2017-06-112-0/+27
| | | | (#2109)
* [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with ↵Yury Selivanov2017-06-101-0/+34
| | | | | | | | | | | | | | | certain servers (GH-409) (#2062) * bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409) (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390) * [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) * asyncio SSL contexts leak sockets after calling close with certain servers * cleanup _shutdown_timeout_handle on _fatal_error. (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390)
* Closing transport during handshake process leaks socket (#480) (#2044)Yury Selivanov2017-06-091-0/+15
|
* Fix waiter cancellation in asyncio.Lock (#1031) (#2037)Yury Selivanov2017-06-091-0/+22
| | | | | | Avoid a deadlock when the waiter who is about to take the lock is cancelled Issue #27585
* bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1584)Xiang Zhang2017-05-151-1/+3
|
* 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-29742: asyncio get_extra_info() throws exception (#525) (#645)Yury Selivanov2017-03-121-0/+12
|
* bpo-28963: Fix out of bound iteration in ↵Yury Selivanov2017-03-031-0/+29
| | | | asyncio.Future.remove_done_callback/C (#408)
* bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405)Seth M. Larson2017-03-031-0/+24
|
* bpo-29271: Fix Task.current_task and Task.all_tasks to accept None. (#406)Yury Selivanov2017-03-031-0/+17
|
* bpo-29703: asyncio: Fix creating new event loops in child processes. (#404) ↵Yury Selivanov2017-03-031-0/+22
| | | | (#410)
* Merge 3.5 (issue #28990)Yury Selivanov2016-12-161-0/+10
|\
| * Issue #28990: Fix SSL hanging if connection is closed before handshake ↵Yury Selivanov2016-12-161-0/+10
| | | | | | | | completed.
* | Issue #28843: Fix asyncio C Task to handle exceptions __traceback__.Yury Selivanov2016-12-011-0/+15
| |
* | Merge 3.5 (issue #28652)Yury Selivanov2016-11-211-6/+4
|\ \ | |/
| * Issue #28652: Partially rollback previous changesYury Selivanov2016-11-211-6/+4
| | | | | | | | Allow AF_UNIX in create_server & create_connection
* | Merge 3.5 (issue #28704)Yury Selivanov2016-11-151-0/+10
|\ \ | |/
| * Issue #28704: Fix create_unix_server to support Path-like objectsYury Selivanov2016-11-151-0/+10
| |
* | 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
| |
* | correctly emulate error semantics of gen.throw in FutureIter_throwBenjamin Peterson2016-11-141-0/+9
| |
* | Merge 3.5 (issue #28652)Yury Selivanov2016-11-093-11/+90
|\ \ | |/
| * Issue #28652: Make loop methods reject socket kinds they do not support.Yury Selivanov2016-11-093-11/+90
| |
* | Merge 3.5 (asyncio)Yury Selivanov2016-11-091-2/+6
|\ \ | |/
| * asyncio: Fix _format_coroutine for coroutine-like objects w/o __name__Yury Selivanov2016-11-091-2/+6
| | | | | | | | | | | | Some built-in coroutine-like objects might not have __name__ or __qualname__. A good example of such are 'asend', 'aclose' and 'athrow' coroutine methods of asynchronous generators.
* | Merge 3.5 (issue #28613)Yury Selivanov2016-11-081-0/+4
|\ \ | |/
| * Issue #28613: Expose asyncio._get_running_loop() and _set_running_loop()Yury Selivanov2016-11-081-0/+4
| |
* | 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-0414-0/+76
|\ \ | |/
| * Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-0414-0/+76
| | | | | | | | when called from coroutines or callbacks.
* | Merge 3.5 (issue #28600)Yury Selivanov2016-11-032-35/+8
|\ \ | |/
| * Issue #28600: Optimize loop.call_soon().Yury Selivanov2016-11-032-35/+8
| | | | | | | | | | Run expensive type checks only in debug mode. In addition, stop supporting passing handles to loop.run_in_executor.
* | 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).
* | 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'.
* | Merge 3.5 (issue #26923)Yury Selivanov2016-10-211-0/+30
|\ \ | |/
| * 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 #28492: Fix how StopIteration is raised in _asyncio.FutureYury Selivanov2016-10-201-0/+13
|/
* Issue #27972: Prohibit Tasks to await on themselves.Yury Selivanov2016-10-091-0/+11
|
* Issue #28399: Remove UNIX socket from FS before binding.Yury Selivanov2016-10-091-5/+7
| | | | Patch by Коренберг Марк.
* asyncio: Only allow Unix Stream sockets for loop.create_unix_server/connectionYury Selivanov2016-10-071-1/+10
|
* Issue #28372: Fix asyncio to support formatting of non-python coroutinesYury Selivanov2016-10-051-0/+34
|