Issue 25633: The documentation for urllib.request should mention http.client.HTTPException (original) (raw)

Issue25633

Created on 2015-11-16 08:42 by jon orebro, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg254720 - (view) Author: jon orebro (jon orebro) Date: 2015-11-16 08:42
The documentation for urllib.request should mention that a robust client using urllib.request must be prepared for exceptions of type http.client.HTTPException in addition to urllib.error.URLError. Example: the server breaks HTTP and returns an empty status line and we get a http.client.BadStatusLine.
msg254762 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-11-16 22:17
Closely related: Issue 22797 proposes documenting some circumstances where ValueError is raised directly. Perhaps you can review and enhance the patch already there. Also related: Issue 13736 proposes to wrap http.client exceptions (which I disagree with), and add extra wrapping for socket.error (which I may agree with for consistency), and document existing “exception leaks”. Issue 6471 discusses awkwardnesses of getting at the underlying exception that URLError wraps.
msg407400 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-11-30 20:23
Issue22797 was resolved by being more specific about when a URLError is raised, rather than mentioning other exceptions as well. Do we want to do more than that, or can this be closed as well?
History
Date User Action Args
2022-04-11 14:58:23 admin set github: 69819
2021-12-06 23:31:14 iritkatriel set status: pending -> closedresolution: out of datestage: needs patch -> resolved
2021-11-30 20:23:03 iritkatriel set status: open -> pendingnosy: + iritkatrielmessages: +
2015-11-16 22:17:41 martin.panter set nosy: + martin.pantermessages: + stage: needs patch
2015-11-16 08:42:51 jon orebro create