]> granicus.if.org Git - python/commit
Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess module
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 1 Feb 2014 21:49:59 +0000 (22:49 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 1 Feb 2014 21:49:59 +0000 (22:49 +0100)
commit915bcb01110c7db65f8be9139bf887c749fbde75
treefa24b947b19c1479ed581dc817c2e696386f3fb0
parent153d97b24e7253f344860094eb2c98ed93657720
Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess module

* Add a new asyncio.subprocess module
* Add new create_subprocess_exec() and create_subprocess_shell() functions
* The new asyncio.subprocess.SubprocessStreamProtocol creates stream readers
  for stdout and stderr and a stream writer for stdin.
* The new asyncio.subprocess.Process class offers an API close to the
  subprocess.Popen class:

  - pid, returncode, stdin, stdout and stderr attributes
  - communicate(), wait(), send_signal(), terminate() and kill() methods

* Remove STDIN (0), STDOUT (1) and STDERR (2) constants from base_subprocess
  and unix_events, to not be confused with the symbols with the same name of
  subprocess and asyncio.subprocess modules
* _ProactorBasePipeTransport.get_write_buffer_size() now counts also the size
  of the pending write
* _ProactorBaseWritePipeTransport._loop_writing() may now pause the protocol if
  the write buffer size is greater than the high water mark (64 KB by default)
Lib/asyncio/__init__.py
Lib/asyncio/base_subprocess.py
Lib/asyncio/proactor_events.py
Lib/asyncio/subprocess.py [new file with mode: 0644]
Lib/asyncio/unix_events.py
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_subprocess.py [new file with mode: 0644]
Lib/test/test_asyncio/test_windows_events.py