Message249167
I agree that the five exception types you mentioned (UnknownProtocol, UnknownTransferEncoding, IncompleteRead, BadStatusLine, LineTooLong) should be derived from IOError. EOFError is probably not a good choice here. It's not something I would expect to see in networking code. ValueError may be better, but I don't know enough about the library to tell whether it is common to use ValueError in similar contexts.
However, ImproperConnectionState (specifically, CannotSendRequest) may be not a programmer error, and, thus, it might be better to have it derived from IOError. See https://hg.python.org/cpython/file/3.5/Lib/http/client.py#l933. Depending on your point of view, you may consider this to be a programmer error or not. |
|
Date |
User |
Action |
Args |
2015-08-25 23:20:13 | Pastafarianist | set | recipients:
+ Pastafarianist, martin.panter |
2015-08-25 23:20:13 | Pastafarianist | set | messageid: <1440544813.58.0.779899421092.issue24788@psf.upfronthosting.co.za> |
2015-08-25 23:20:13 | Pastafarianist | link | issue24788 messages |
2015-08-25 23:20:13 | Pastafarianist | create | |
|