This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Pastafarianist
Recipients Pastafarianist, martin.panter
Date 2015-08-25.23:20:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440544813.58.0.779899421092.issue24788@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-08-25 23:20:13Pastafarianistsetrecipients: + Pastafarianist, martin.panter
2015-08-25 23:20:13Pastafarianistsetmessageid: <1440544813.58.0.779899421092.issue24788@psf.upfronthosting.co.za>
2015-08-25 23:20:13Pastafarianistlinkissue24788 messages
2015-08-25 23:20:13Pastafarianistcreate