summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX ↵Michael Felt2019-06-121-0/+2
| | | | | | | | | | | (GH-14011) because "getaddrinfo()" behaves different on AIX https://bugs.python.org/issue35545
* bpo-37142: Make asyncio stream tests more robust again (GH-13804)Andrew Svetlov2019-06-041-9/+16
| | | | Make test_stream_server_close() implementation following test_stream_server_abort(). Add explicit timeout for tests that can hang.
* Make StreamServer.close() tests more robust (GH-13790)Andrew Svetlov2019-06-041-11/+37
|
* bpo-37148: Fix asyncio test that check for warning when running the test ↵Pablo Galindo2019-06-041-0/+4
| | | | suite with huntleaks (GH-13800)
* Revert "bpo-35621: Support running subprocesses in asyncio when loop is ↵Andrew Svetlov2019-06-042-48/+26
| | | | | executed in non-main thread (#13630)" (GH-13793) https://bugs.python.org/issue35621
* bpo-37137: Fix test_asyncio: use TestCase.set_event_loop() (GH-13779)Victor Stinner2019-06-031-13/+8
| | | | | | | | | Replace asyncio.set_event_loop() with TestCase.set_event_loop() of test_asyncio.utils: this method calls TestCase.close_loop() which waits until the executor completes, to avoid leaking dangling threads. Inherit from test_asyncio.utils.TestCase rather than unittest.TestCase.
* bpo-35621: Fix tests when SafeChildWatcher is expected instead of ↵Andrew Svetlov2019-06-021-0/+1
| | | | | ThreadedChildWatcher (GH-13754) https://bugs.python.org/issue35621
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-022-26/+48
| | | | non-main thread (#13630)
* bpo-36999: Add asyncio.Task.get_coro() (GH-13680)Alex Grönholm2019-05-301-0/+10
| | | https://bugs.python.org/issue36999
* bpo-37015: Ensure tasks created by _accept_connection2 due to AsyncMock are ↵Xtreak2019-05-301-6/+8
| | | | | | | | completed (GH-13661) From 3.8 async functions used with mock.patch return an `AsyncMock`. `_accept_connection2` is an async function where create_task is also mocked. Don't mock `create_task` so that tasks are created out of coroutine returned by `AsyncMock` and the tasks are completed. https://bugs.python.org/issue37015
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-291-0/+11
| | | | | | | | | Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
* bpo-29883: Asyncio proactor udp (GH-13440)Andrew Svetlov2019-05-282-9/+278
| | | | | | Follow-up for #1067 https://bugs.python.org/issue29883
* bpo-36686: Improve the documentation of the std* params in ↵sbstp2019-05-271-0/+90
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* bpo-36889: Merge asyncio streams (GH-13251)Andrew Svetlov2019-05-277-213/+872
| | | https://bugs.python.org/issue36889
* bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') ↵Yury Selivanov2019-05-272-3/+3
| | | | | | | | | | (GH-13530) Return a safe to use proxy socket object from `transport.get_extra_info('socket')` https://bugs.python.org/issue37027
* bpo-37035: Don't log OSError (GH-13548)Andrew Svetlov2019-05-272-7/+26
| | | https://bugs.python.org/issue37035
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-272-6/+4
| | | | | | | | | | | | | | | This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain. In 3.9 we'll focus on implementing supervisors and cancel scopes, which should allow better handling of all exceptions, including SystemExit and KeyboardInterrupt
* Pass _asyncio_internal=True into stream tests on windows (#13442)Andrew Svetlov2019-05-201-2/+4
|
* bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails ↵Niklas Fiekas2019-05-201-4/+13
| | | | | | | | (GH-11553) This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it. https://bugs.python.org/issue35721
* bpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271)Erwan Le Pape2019-05-171-0/+22
| | | | | | | | This PR proposes a solution to [bpo-35545](https://bugs.python.org/issue35545) by adding an optional `flowinfo` and `scopeid` to `asyncio.base_events._ipaddr_info` to carry the full address information into `_ipaddr_info` and avoid discarding IPv6 specific information. Changelog entry & regression tests to come. https://bugs.python.org/issue35545
* bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)Andrew Svetlov2019-05-166-310/+290
| | | | | | The second attempt. Now deprecate `@coroutine` only, keep `yield from fut` as is. https://bugs.python.org/issue36921
* bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779)Paul Monson2019-05-151-2/+2
|
* bpo-36801: Temporarily fix regression in writer.drain() (#13330)Andrew Svetlov2019-05-141-23/+0
|
* bpo-36916: asyncio: Swallow unhandled write() exception (GH-13313)Andrew Svetlov2019-05-141-0/+3
|
* bpo-36884: Fix DeprecationWarning in test_asyncio StreamReader instantiation ↵Xtreak2019-05-111-1/+1
| | | | | (GH-13243) https://bugs.python.org/issue36884
* bpo-36802: Drop awrite()/aclose(), support await write() and await close() ↵Andrew Svetlov2019-05-091-12/+30
| | | | instead (#13099)
* bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport ↵Andrew Svetlov2019-05-071-0/+23
| | | | | (GH-13098) https://bugs.python.org/issue36801
* bpo-35125: remove inner callback on outer cancellation in asyncio shield ↵Romain Picard2019-05-071-1/+10
| | | | | | | | | | | | | | (GH-10340) When the future returned by shield is cancelled, its completion callback of the inner future is not removed. This makes the callback list of inner inner future grow each time a shield is created and cancelled. This change unregisters the callback from the inner future when the outer future is cancelled. https://bugs.python.org/issue35125
* bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)Vincent Michel2019-05-072-0/+18
| | | | | | | | | | | | *Moved from python/asyncio#493.* This PR fixes issue python/asyncio#480, as explained in [this comment](https://github.com/python/asyncio/issues/480#issuecomment-278703828). The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected. It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting). https://bugs.python.org/issue31922
* Forbid creating of stream objects outside of asyncio (#13101)Andrew Svetlov2019-05-072-50/+128
|
* bpo-24638: Improve the error message in asyncio.ensure_future() (#12848)Zackery Spytz2019-05-031-0/+9
|
* bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399)xdegaye2019-05-031-1/+1
| | | | | | | Those tests may fail with PermissionError. https://bugs.python.org/issue36341
* bpo-34139: Remove unix datagram socket from FS before binding (GH-8323)Quentin Dawans2019-04-091-0/+14
| | | https://bugs.python.org/issue34139
* bpo-35934: Add socket.create_server() utility function (GH-11784)Giampaolo Rodola2019-04-083-26/+7
|
* asyncio: PendingDeprecationWarning -> DeprecationWarning (GH-12494)Inada Naoki2019-03-221-9/+9
| | | `Task.current_task()` and `Task.all_tasks()` will be removed in 3.9.
* bpo-34745: Fix asyncio sslproto memory issues (GH-12386)Fantix King2019-03-171-0/+72
| | | | | | | | | | | | | | * Fix handshake timeout leak in asyncio/sslproto Refs MagicStack/uvloop#222 * Break circular ref _SSLPipe <-> SSLProtocol * bpo-34745: Fix asyncio ssl memory leak * Break circular ref SSLProtocol <-> UserProtocol * Add NEWS entry
* bpo-35568: add 'raise_signal' function (GH-11335)Vladimir Matveev2019-01-081-1/+1
| | | | | | As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function. https://bugs.python.org/issue35568
* bpo-32710: test_asyncio: test_sendfile reset policy (GH-11461)Victor Stinner2019-01-071-0/+4
| | | | | test_asyncio/test_sendfile.py now resets the event loop policy using tearDownModule() as done in other tests, to prevent a warning when running tests on Windows.
* bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274)Vladimir Matveev2019-01-052-76/+19
|
* bpo-35602: Make sure the transport is always closed in ↵Pablo Galindo2018-12-291-5/+5
| | | | | SelectorEventLoopUnixSockSendfileTests (GH-11338) There is a race condition in SelectorEventLoopUnixSockSendfileTests that causes the prepare() method return a non connected server protocol, making the cleanup() method skips the correct handling of the transport. This commit makes prepare() always return a connected server protocol that can always be cleaned up correctly.
* bpo-35601: Alleviate race condition when waiting for SIGALRM in test_asyncio ↵Pablo Galindo2018-12-291-1/+3
| | | | | | (GH-11337) There is a race condition regarding signal delivery in test_signal_handling_args for test_asyncio.test_events.KqueueEventLoopTests. The signal can be received at any moment outside the time window provided in the test. The fix is to wait for the signal to be received instead with a bigger timeout.
* bpo-23057: add loop self socket as wakeup fd for signals (#11135)Vladimir Matveev2018-12-183-5/+89
|
* bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz2018-12-172-0/+16
| | | | (GH-11175)
* bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)Victor Stinner2018-12-171-2/+2
| | | | | | | Replace time.time() with time.monotonic() in tests to measure time delta. test_zipfile64: display progress every minute (60 secs) rather than every 5 minutes (5*60 seconds).
* bpo-35394: Add empty slots to abstract asyncio protocols (#10889)Andrew Svetlov2018-12-112-24/+57
| | | | | | * bpo-35394: Add empty slots to abstract asyncio protocols * Add missing test file
* bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)Andrew Svetlov2018-12-032-29/+27
|
* bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)Victor Stinner2018-11-301-7/+1
| | | 'here' variable is no longer needed.
* bpo-35352: test_asyncio uses the certificate set from the test directory ↵stratakis2018-11-305-185/+3
| | | | | | | (GH-10826) Modify asyncio tests to utilize the certificates from the test directory instead of its own set, as they are the same and with each update they had to be updated as well.
* bpo-35202: Remove unused imports in tests. (GH-10561)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-161-1/+0
|
* bpo-30064: Refactor sock_* asyncio API (#10419)Andrew Svetlov2018-11-123-406/+116
|