cpython/Lib/test/test_asyncio
Victor Stinner 47cd10d7a9 asyncio: sync with Tulip
Issue #23347: send_signal(), kill() and terminate() methods of
BaseSubprocessTransport now check if the transport was closed and if the
process exited.

Issue #23347: Refactor creation of subprocess transports. Changes on
BaseSubprocessTransport:

* Add a wait() method to wait until the child process exit
* The constructor now accepts an optional waiter parameter. The _post_init()
  coroutine must not be called explicitly anymore. It makes subprocess
  transports closer to other transports, and it gives more freedom if we want
  later to change completly how subprocess transports are created.
* close() now kills the process instead of kindly terminate it: the child
  process may ignore SIGTERM and continue to run. Call explicitly terminate()
  and wait() if you want to kindly terminate the child process.
* close() now logs a warning in debug mode if the process is still running and
  needs to be killed
* _make_subprocess_transport() is now fully asynchronous again: if the creation
  of the transport failed, wait asynchronously for the process eixt. Before the
  wait was synchronous. This change requires close() to *kill*, and not
  terminate, the child process.
* Remove the _kill_wait() method, replaced with a more agressive close()
  method. It fixes _make_subprocess_transport() on error.
  BaseSubprocessTransport.close() calls the close() method of pipe transports,
  whereas _kill_wait() closed directly pipes of the subprocess.Popen object
  without unregistering file descriptors from the selector (which caused severe
  bugs).

These changes simplifies the code of subprocess.py.
2015-01-30 00:05:19 +01:00
..
__init__.py Issue #22002: Make full use of test discovery in test sub-packages. 2014-07-23 12:00:29 -05:00
__main__.py Issue #22002: Make full use of test discovery in test sub-packages. 2014-07-23 12:00:29 -05:00
echo.py
echo2.py
echo3.py
keycert3.pem
pycacert.pem
ssl_cert.pem
ssl_key.pem
test_base_events.py Issue #23243: Close explicitly event loops in asyncio tests 2015-01-15 13:17:34 +01:00
test_events.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
test_futures.py asyncio: sync with Tulip 2015-01-15 00:04:21 +01:00
test_locks.py asyncio: sync with Tulip 2014-07-29 12:58:23 +02:00
test_proactor_events.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
test_queues.py Issue #21163, asyncio: Fix some "Task was destroyed but it is pending!" logs in tests 2014-06-25 23:11:21 +02:00
test_selector_events.py asyncio: sync with Tulip 2015-01-29 02:56:05 +01:00
test_sslproto.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
test_streams.py asyncio: pyflakes, remove unused import 2015-01-21 23:39:16 +01:00
test_subprocess.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
test_tasks.py Closes #23219: cancelling asyncio.wait_for() now cancels the task 2015-01-15 16:29:10 +01:00
test_transports.py asyncio: Move loop attribute to _FlowControlMixin 2014-11-05 15:27:41 +01:00
test_unix_events.py asyncio: sync with Tulip 2015-01-29 14:15:19 +01:00
test_windows_events.py Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe() as a coroutine 2015-01-26 15:04:03 +01:00
test_windows_utils.py asyncio: Close transports in tests 2015-01-15 14:24:55 +01:00