summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* bpo-35065: Remove `StreamReaderProtocol._untrack_reader` (#10212)Vincent Michel2018-11-081-0/+23
| | | | | The call to `_untrack_reader` is performed too soon, causing the protocol to forget about the reader before `connection_lost` can run and feed the EOF to the reader. See bpo-35065.
* bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)Pablo Galindo2018-10-291-0/+7
| | | Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
* bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵Pablo Galindo2018-10-261-2/+2
| | | | | | | | | | | isasyncgenfunction work with functools.partial (GH-9903) inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
* bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)twisteroid ambassador2018-10-091-0/+68
|
* Extract sendfile tests into a separate test file (#9757)Andrew Svetlov2018-10-092-450/+551
|
* Extract tests for sock_*() functions into a separate file (GH-9761)Andrew Svetlov2018-10-082-130/+238
|
* bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679)Elvis Pranskevichus2018-10-031-0/+36
| | | | | | | | | | | | | | | | | The C implementation of asyncio.Task currently fails to perform the cancellation cleanup correctly in the following scenario. async def task1(): async def task2(): await task3 # task3 is never cancelled asyncio.current_task().cancel() await asyncio.create_task(task2()) The actuall error is a hardcoded call to `future_cancel()` instead of calling the `cancel()` method of a future-like object. Thanks to Vladimir Matveev for noticing the code discrepancy and to Yury Selivanov for coming up with a pathological scenario.
* bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661)Yury Selivanov2018-10-0213-158/+144
|
* bpo-34849: Don't log wating for selector.select in asyncio loop iteration ↵Andrew Svetlov2018-09-301-25/+0
| | | | | | | | | | (GH-9641) The waiting is pretty normal for any asyncio program, logging its time just adds a noise to logs without any useful information provided. https://bugs.python.org/issue34849
* bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)Victor Stinner2018-09-252-2/+3
|
* bpo-34728: Remove deprecate *loop* argument in asyncio.sleep (GH-9415)João Júnior2018-09-241-0/+29
| | | | | | | | | | | | | | | | * Insert the warn in the asyncio.sleep when the loop argument is used * Insert the warn in the asyncio.wait and asyncio.wait_for when the loop argument is used * Better format of the code * Add news file * change calls for get_event_loop() to calls for get_running_loop() * Change message to be more clear in News * Improve the comments in test_tasks