Author christian.heimes
Recipients
Date 2007-08-10.01:43:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
My patch fixes small parts of the io module:

* replaced all asserts with appropriate TypeError() or ValueError() exceptions

* default to buffering = 1 when raw is a tty

* added four methods _checkSeekable(msg=None), _checkReadable, _checkWritable and _checkClosed as convenient methods to raise exceptions when a file is closed or not read, write or seekable.

* added a unit test to check __all__

* SocketIO.readable/writeable checks for self.closed, too

* SocketIO.readinto/write checks for readable, writeable and closed status

__all__ references SocketIO but it is not available in io.py. The definition is in socket.py and it doesn't use any socket related code directly. What do you think about moving SocketIO to io.py in the sake of keeping everything together?

NOTE: You may want to check my English in the exception messages. ;)
History
Date User Action Args
2007-08-23 15:59:37adminlinkissue1771364 messages
2007-08-23 15:59:37admincreate