SiteSupport/gevent — pull request #175 by vitaly-krugl (2012-10-17 17:15:44+00:00)
Title: Fixes for issues #147 and #146

Fixed issue #147 ("FileObject(stdin) causes os.write on stdout to fail with OSError: [Errno 35]
Resource temporarily unavailable") by adding an optional arg restore_flags to FileObjectPosix
constructor. This enables an efficient default case (restore_flags=False, such as FileObject's
use in gevent.subprocess.Popen), while enabling FileObjectPosix to also be used for stdin, etc.
without causing unexpected failures in stdout I/O. Implemented test_fcntl_flags_preserved() in
test__fileobject.py.

Fixed issue #146 ("FileObject incorrectly reports end of file when file descriptor is closed
prematurely"). NOTE: this was fixed in teh same commit as #147 due to rewrite in the same block
of code. Implemented test_EBADF_from_read_with_fd_closed() in test__fileobject.py.

Implemented additional fileobject test: test_newlines_only_in_small_read_chunks()

Fixed lost data in my original pull request changes when self.recv is called recursively.
Removed my TODO from the pull request about possibly deep recursion and need for yield -- I was wrong about that.