[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-26 Thread Pastafarianist
Pastafarianist added the comment: My bad then. How do we proceed with introducing a change to the standard library? -- ___ Python tracker ___ ___

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-25 Thread Martin Panter
Martin Panter added the comment: Regarding CannotSendRequest: HTTPConnection will connect again with a new socket if a previous response will close the old connection. See a few lines below where you linked: “If point (2) is true, then we . . . will open a new [socket] when a new request is ma

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-25 Thread Pastafarianist
Pastafarianist added the comment: 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

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-04 Thread Martin Panter
Martin Panter added the comment: Did you have any specific exceptions in mind, or specific subclasses of IOError? In 3.5 we now have the RemoteDisconnected exception, which derives ConnectionResetError. Some of the other exceptions are only local programmer errors. Currently documented excepti

[issue24788] HTTPException is derived from Exception instead of IOError

2015-08-04 Thread Pastafarianist
New submission from Pastafarianist: In both Python 2 and Python 3, HTTPException is derived from Exception. This is not quite convenient, since catching all connection-related errors while performing an HTTP query requires catching both IOError (which is subclassed by socket.error) and HTTPExc