Message53014
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. ;) |
|
Date |
User |
Action |
Args |
2007-08-23 15:59:37 | admin | link | issue1771364 messages |
2007-08-23 15:59:37 | admin | create | |
|