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

HTTPConnection.set_debuglevel has no information about level range #54914

Closed
JTMoon79 mannequin opened this issue Dec 14, 2010 · 6 comments
Closed

HTTPConnection.set_debuglevel has no information about level range #54914

JTMoon79 mannequin opened this issue Dec 14, 2010 · 6 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@JTMoon79
Copy link
Mannequin

JTMoon79 mannequin commented Dec 14, 2010

BPO 10705
Nosy @bitdancer

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 2010-12-15.02:20:34.991>
created_at = <Date 2010-12-14.19:22:41.992>
labels = ['type-bug', 'docs']
title = 'HTTPConnection.set_debuglevel has no information about level range'
updated_at = <Date 2010-12-15.02:20:34.990>
user = 'https://bugs.python.org/JTMoon79'

bugs.python.org fields:

activity = <Date 2010-12-15.02:20:34.990>
actor = 'r.david.murray'
assignee = 'docs@python'
closed = True
closed_date = <Date 2010-12-15.02:20:34.991>
closer = 'r.david.murray'
components = ['Documentation']
creation = <Date 2010-12-14.19:22:41.992>
creator = 'JTMoon79'
dependencies = []
files = []
hgrepos = []
issue_num = 10705
keywords = []
message_count = 6.0
messages = ['123974', '123976', '123991', '123992', '123999', '124002']
nosy_count = 3.0
nosy_names = ['r.david.murray', 'docs@python', 'JTMoon79']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue10705'
versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

@JTMoon79
Copy link
Mannequin Author

JTMoon79 mannequin commented Dec 14, 2010

Function HTTPConnection.set_debuglevel(level)
There is no range of acceptable debug levels.
What should be the difference in set_debuglevel(1) and set_debuglevel(1000)?
If the documentation lists the levels this would save users from needing to do tedious trial-error experimentation.

From
http://docs.python.org/py3k/library/http.client.html#http.client.HTTPConnection.set_debuglevel

@JTMoon79 JTMoon79 mannequin assigned docspython Dec 14, 2010
@JTMoon79 JTMoon79 mannequin added the docs Documentation in the Doc dir label Dec 14, 2010
@bitdancer
Copy link
Member

Or, since this is Python, they could look at the code and find out that all levels above zero are equivalent. (If I had to guess I'd say 'level' was either future proofing or designed for the use of subclasses).

But you are right, this should be mentioned in the documentation. Care to propose a patch?

@bitdancer bitdancer added the type-bug An unexpected behavior, bug, or error label Dec 14, 2010
@JTMoon79
Copy link
Mannequin Author

JTMoon79 mannequin commented Dec 14, 2010

Hi David,
Currently the 3.1 documentation reads:
"""HTTPConnection.set_debuglevel(level)¶
Set the debugging level (the amount of debugging output printed). The default debug level is 0, meaning no debugging output is printed."""
How about:
"""HTTPConnection.set_debuglevel(level)¶
Set the debug level. The debug level is the amount of debugging output printed.
The default debug level is 0, meaning no debugging output is printed.
Currently, any debug level value greater than 0 prints the same amount of debugging output.
debugging output is printed to stdout."""

Information is from the file C:\Python\ActivePython3.1.2.3\Lib\http\client.py

@JTMoon79
Copy link
Mannequin Author

JTMoon79 mannequin commented Dec 14, 2010

Care to propose a patch?
oops. I just found http://www.python.org/dev/patches/
I'll get around to creating a PEP sometime soon.

@bitdancer
Copy link
Member

I think a PEP is a bit of overkill for a small doc update :) A patch would be fine...but I can also just make the change. I'll probably tweak your wording a bit.

@bitdancer
Copy link
Member

I've committed a fix in r87256. I looked at the code some more and tried to be a precise as possible without getting too wordy. (The fix will get backported by and by.)

@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

1 participant