summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() ↵Victor Stinner2020-06-181-2/+2
| | | | | | | | | | | (GH-20944) (GH-20962) (GH-20966) On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module. (cherry picked from commit ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881) (cherry picked from commit b1e736113484c99acb57e4acb417b91a9e58e7ff)
* bpo-39148: enable ipv6 for datagrams in Proactor (GH-19121)Miss Islington (bot)2020-05-181-3/+12
| | | | | | | | | Ifdef is not necessary, as AF_INET6 is supported from Windows Vista, and other code in overlapped.c uses AF_INET6 and is not ifdef'd. Change the raised exception so users are not fooled to think it comes from Windows API. Automerge-Triggered-By: @njsmith (cherry picked from commit 442634c42fcaf31c636f693951a97734042c3e7b) Co-authored-by: Kjell Braden <afflux@pentabarf.de>
* [3.8] bpo-39794: Add --without-decimal-contextvar (GH-18702)Stefan Krah2020-02-291-0/+1
| | | (cherry picked from commit 815280eb160af637e1347213659f9236adf78f80)
* [3.8] bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894)Andrew Svetlov2020-01-071-2/+6
| | | | | | https://bugs.python.org/issue39191. (cherry picked from commit 10ac0cded26d91c3468e5e5a87cecad7fc0bcebd) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Fix warnings in test_asyncio.test_base_events (GH-17577) (GH-17579)Miss Islington (bot)2019-12-171-3/+4
| | | | | | Co-authored-by: tirkarthi (cherry picked from commit 1988344a6bff253f017e053f69318ecf03587294) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR ↵Miss Islington (bot)2019-12-091-17/+24
| | | | | | | (GH-17311) (#17529) (cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-38529: Fix asyncio stream warning (GH-17474)Miss Islington (bot)2019-12-071-53/+0
| | | | | (cherry picked from commit 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix ↵Miss Islington (bot)2019-11-201-1/+1
| | | | | | | | | | | | (GH-17294) on platforms lacking a functional bind() for named unix domain sockets https://bugs.python.org/issue38841 Automerge-Triggered-By: @asvetlov (cherry picked from commit 559bad1a70ed50cc9caa7cb303b6ac1fe6a34af3) Co-authored-by: xdegaye <xdegaye@gmail.com>
* bpo-38785: Prevent asyncio from crashing (GH-17144)Miss Islington (bot)2019-11-131-0/+39
| | | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785 (cherry picked from commit dad6be5ffe48beb74fad78cf758b886afddc7aed) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)Miss Skeleton (bot)2019-10-231-0/+2
| | | | | | | bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in the main thread. (cherry picked from commit 1b53a24fb4417c764dd5933bce505f5c94249ca6) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-35998: Fix test_asyncio.test_start_tls_server_1() (GH-16815)Miss Islington (bot)2019-10-161-14/+10
| | | | | | | | | | | | | main() is now responsible to send the ANSWER, rather than ServerProto. main() now waits until it got the HELLO before sending the ANSWER over the new transport. Previously, there was a race condition between main() replacing the protocol and the protocol sending the ANSWER once it gets the HELLO. TLSv1.3 was disabled for the test: reenable it. (cherry picked from commit fab4ef2df0857ab0c97f3058ac5ec3280c4eb891) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) ↵Yury Selivanov2019-09-305-979/+192
| | | | | (#16485) See https://bugs.python.org/issue38242 for more details
* bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe ↵Miss Islington (bot)2019-09-291-0/+27
| | | | | | | (GH-16472) (cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) ↵Miss Islington (bot)2019-09-251-0/+4
| | | | | | | (GH-16383) (cherry picked from commit edad4d89e357c92f70c0324b937845d652b20afd) Co-authored-by: Yury Selivanov <yury@edgedb.com>
* bpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288)Miss Islington (bot)2019-09-201-253/+0
| | | | | | | ProactorDatagramTransportTests tests are too close to the implementation. (cherry picked from commit bc2256ea177a653bcab15b06b5f5725b10c1fff3) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37199: Replace the early returns added in c2cda63. (GH-14535)Miss Islington (bot)2019-09-131-37/+34
| | | | | (cherry picked from commit 81319a81b2a3f42fe1047c2e6f5fd958faab6cdb) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-38148: Add slots to asyncio transports (GH-16077) (GH-16093)Andrew Svetlov2019-09-131-4/+9
| | | | | | | | | | * bpo-38148: Add slots to asyncio transports * Update Misc/NEWS.d/next/Library/2019-09-13-08-55-43.bpo-38148.Lnww6D.rst Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit 9eb35ab0d71a6bd680e84fa0f828cb634e72b681) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Miss Islington (bot)2019-09-123-89/+117
| | | | | (cherry picked from commit a488879cbaf4b8b52699cadccf73bb4c271bcb29) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Miss Islington (bot)2019-09-1113-159/+156
| | | | | | | asyncio tests (GH-15928) (cherry picked from commit 9aee90018a5213e3529768e0b873955d23f5e50b) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)Andrew Svetlov2019-09-112-6/+4
| | | | | | https://bugs.python.org/issue36373 (cherry picked from commit 7264e92b718d307cc499b2f10eab7644b00f0499) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38066: Hide internal Stream methods (GH-15762)Miss Islington (bot)2019-09-102-81/+105
| | | | | | | | feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now. https://bugs.python.org/issue38066 (cherry picked from commit 12c122ae958a55c9874ed4c7d7805ceb084411d7) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs ↵Miss Islington (bot)2019-09-105-253/+372
| | | | | | | | | | | | | | [locks] (GH-13920) This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. Third step: locks.py https://bugs.python.org/issue36373 (cherry picked from commit 537877d85d1c27d2c2f5189e39da64a7a0c413d3) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* bpo-34679: Restore instantiation Windows IOCP event loop from non-main ↵Miss Islington (bot)2019-08-261-0/+19
| | | | | | | | | | thread (GH-15492) * Restore running proactor event loop from non-main thread Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit 1c0600998681295735a18690fae184b0c9a4ca51) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Remove unused imports in tests (GH-14518) (GH-14520)Victor Stinner2019-07-017-12/+0
| | | (cherry picked from commit 8f4ef3b019ce380022018587571b0f970e668de3)
* bpo-37199: Fix test failures when IPv6 is unavailable or disabled (GH-14480)Miss Islington (bot)2019-06-301-1/+8
| | | | | (cherry picked from commit c2cda638d63b98f5cf9a8ef13e15aace2b7e3f0b) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Miss Islington (bot)2019-06-303-26/+61
| | | | | | | non-main thread (GH-14344) (cherry picked from commit 0d671c04c39b52e44597491b893eb0b6c86b3d45) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Replace deprecation warning with RuntimeError (GH-14397)Miss Islington (bot)2019-06-271-0/+6
| | | | | (cherry picked from commit 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Get rid of exception traceback printing in asyncio tests (GH-14343)Miss Islington (bot)2019-06-241-2/+2
| | | | | (cherry picked from commit 549f7d45c8d61ab7b1d4a4e266b9d790ad6f7504) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)Miss Islington (bot)2019-06-221-1/+3
| | | | | | | | When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`. https://bugs.python.org/issue37323 (cherry picked from commit 186f70905d07b42a9cbf0a29e448f30baf2b53cb) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* bpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS (GH-14188)Miss Islington (bot)2019-06-181-2/+4
| | | | | (cherry picked from commit a514f782b822bd7bca7c8d78be7bd53bc25c1908) Co-authored-by: Ned Deily <nad@python.org>
* bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148)Miss Islington (bot)2019-06-171-0/+6
| | | | | | | | bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the client context. (cherry picked from commit c034b7824f5a7c50f2946ab3931633200e31d903) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37279: Fix asyncio sendfile support when extra data are sent in ↵Miss Islington (bot)2019-06-151-1/+2
| | | | | | | fallback mode. (GH-14075) (cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() ↵Miss Islington (bot)2019-06-141-18/+19
| | | | | | | (GH-14080) (cherry picked from commit f0749da9a535375f05a2015e8960e8ae54877349) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37278: Fix test_asyncio ProactorLoopCtrlC (GH-14074)Miss Islington (bot)2019-06-141-7/+8
| | | | | | | | | | | | | | | | Join the thread to prevent leaking a running thread and leaking a reference. Cleanup also the test: * asyncioWindowsProactorEventLoopPolicy became the default policy, there is no need to set it manually. * Only start the thread once the loop is running. * Use a shorter sleep in the thread (100 ms rather than 1 sec). * Use close_loop(loop) rather than loop.close(). * Use longer variable names. (cherry picked from commit 07559450b2d9179e4c99e0af088ce7550e549f94) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* Make asyncio stream sendfile fail on error (was hang) (GH-14025)Miss Islington (bot)2019-06-121-5/+8
| | | | | (cherry picked from commit 0d1942774a70d561dbaaa980742dd0927e8aa51a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX ↵Miss Islington (bot)2019-06-121-0/+2
| | | | | | | | | | (GH-14011) because "getaddrinfo()" behaves different on AIX https://bugs.python.org/issue35545 (cherry picked from commit 32dda263e4e8c8e0fadc2bb29b9856e2f177dde9) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* 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