Commit Graph

25 Commits

Author SHA1 Message Date
Yury Selivanov b057c52b01 asyncio: Add support for UNIX Domain Sockets. 2014-02-18 12:15:06 -05:00
Victor Stinner dc62b7e261 asyncio: Tulip issue 112: Inline make_handle() into Handle constructor 2014-02-10 00:45:44 +01:00
Victor Stinner 915bcb0111 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)
2014-02-01 22:49:59 +01:00
Victor Stinner 61b3c9bacc asyncio: Fix _UnixWritePipeTransport, raise BrokenPipeError when the pipe is
closed, but only if there was pending write
2014-01-31 13:04:28 +01:00
Victor Stinner 73f10fd2f1 asyncio: Fix _make_subprocess_transport(): pass extra value to the constructor. 2014-01-29 14:32:20 -08:00
Guido van Rossum 47fb97e4e6 asyncio: Add write flow control to unix pipes. 2014-01-29 13:20:39 -08:00
Victor Stinner 63b4d4b494 asyncio: _fatal_error() of _UnixWritePipeTransport and _ProactorBasePipeTransport shouldn't log BrokenPipeError nor ConnectionResetError.
(Same behaviour as _SelectorTransport._fatal_error().)
2014-01-29 13:12:03 -08:00
Andrew Svetlov 0742cae335 Merge latest Tulip into asyncio 2014-01-26 18:36:01 +02:00
Guido van Rossum ab27a9fc4b asyncio: Fix race in FastChildWatcher (by its original author, Anthony Baire). 2014-01-25 16:32:17 -08:00
Victor Stinner 8dffc456d7 Update asyncio from the Tulip project
Major changes:

- StreamReader.readexactly() now raises an IncompleteReadError if the
  end of stream is reached before we received enough bytes, instead of
  returning less bytes than requested.

- Unit tests use the main asyncio module instead of submodules like events

- _UnixWritePipeTransport now also supports character devices, as
  _UnixReadPipeTransport. Patch written by Jonathan Slenders.

- Export more symbols: BaseEventLoop, BaseProactorEventLoop,
  BaseSelectorEventLoop, Queue and Queue sublasses, Empty, Full
2014-01-25 15:32:06 +01:00
Guido van Rossum 02757ea7e9 asyncio: Minimal pty support in UNIX read pipe, by Jonathan Slenders. 2014-01-10 13:30:04 -08:00
Guido van Rossum 4835f17c24 asyncio: Fix race in subprocess transport, by Victor Stinner. 2014-01-10 13:28:59 -08:00
Charles-François Natali 74e7cf3f46 Issue #19850: asyncio: Set SA_RESTART when registering a signal handler to
limit EINTR occurrences.
2013-12-05 22:47:19 +01:00
Guido van Rossum 2bcae708d8 asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix). 2013-11-13 15:50:08 -08:00
Guido van Rossum 82e9f32f17 asyncio: Temporary fix by Victor Stinner for issue 19566. 2013-11-13 11:08:34 -08:00
Guido van Rossum 0b69fbc642 asyncio: Add close() back to Unix selector event loop, to remove all signal handlers. Should fix buildbot issues. 2013-11-06 20:25:50 -08:00
Guido van Rossum 0eaa5ac9b5 asyncio: Refactor SIGCHLD handling. By Anthony Baire. 2013-11-04 15:50:46 -08:00
Guido van Rossum 5969128a86 asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk). 2013-10-30 14:52:03 -07:00
Guido van Rossum 934f6ea7fb Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX hang). 2013-10-21 20:37:14 -07:00
Guido van Rossum 8da15cc218 asyncio: be more lenient if we don't understand status returned by waitpid().
This should have no effect, it's a "shouldn't happe" case.
Also tidied up some comments.
2013-10-21 15:00:44 -07:00
Charles-François Natali 5121debebf Issue #19310: asyncio: fix child processes reaping logic. 2013-10-20 23:23:44 +02:00
Charles-François Natali bcd76827f4 Issue #19309: asyncio: make waitpid() wait for all child processes, not only
those in the same process group.
2013-10-20 20:31:43 +02:00
Guido van Rossum 57497ad181 Rename Transport.pause/resume to pause_reading/pause_writing. Also relax timeout in test_call_later(). 2013-10-18 07:58:20 -07:00
Guido van Rossum fc29e0f37e Rename the logger to plain "logger". 2013-10-17 15:39:45 -07:00
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00