Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The documentation for urllib.request should mention http.client.HTTPException #69819

Closed
jonorebro mannequin opened this issue Nov 16, 2015 · 3 comments
Closed

The documentation for urllib.request should mention http.client.HTTPException #69819

jonorebro mannequin opened this issue Nov 16, 2015 · 3 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@jonorebro
Copy link
Mannequin

jonorebro mannequin commented Nov 16, 2015

BPO 25633
Nosy @vadmium, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-12-06.23:31:14.461>
created_at = <Date 2015-11-16.08:42:51.704>
labels = ['type-bug', 'docs']
title = 'The documentation for urllib.request should mention http.client.HTTPException'
updated_at = <Date 2021-12-06.23:31:14.460>
user = 'https://bugs.python.org/jonorebro'

bugs.python.org fields:

activity = <Date 2021-12-06.23:31:14.460>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = True
closed_date = <Date 2021-12-06.23:31:14.461>
closer = 'iritkatriel'
components = ['Documentation']
creation = <Date 2015-11-16.08:42:51.704>
creator = 'jon orebro'
dependencies = []
files = []
hgrepos = []
issue_num = 25633
keywords = []
message_count = 3.0
messages = ['254720', '254762', '407400']
nosy_count = 4.0
nosy_names = ['docs@python', 'martin.panter', 'jon orebro', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue25633'
versions = ['Python 3.4']

@jonorebro
Copy link
Mannequin Author

jonorebro mannequin commented Nov 16, 2015

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.

@jonorebro jonorebro mannequin assigned docspython Nov 16, 2015
@jonorebro jonorebro mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Nov 16, 2015
@vadmium
Copy link
Member

vadmium commented Nov 16, 2015

Closely related: bpo-22797 proposes documenting some circumstances where ValueError is raised directly. Perhaps you can review and enhance the patch already there.

Also related:

bpo-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”.

bpo-6471 discusses awkwardnesses of getting at the underlying exception that URLError wraps.

@iritkatriel
Copy link
Member

bpo-22797 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?

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants