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

httplib.HTTPResponse documentations inconsistent #47680

Open
ThomasH mannequin opened this issue Jul 22, 2008 · 5 comments
Open

httplib.HTTPResponse documentations inconsistent #47680

ThomasH mannequin opened this issue Jul 22, 2008 · 5 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@ThomasH
Copy link
Mannequin

ThomasH mannequin commented Jul 22, 2008

BPO 3430
Nosy @terryjreedy, @orsenthil, @ezio-melotti, @merwok
Dependencies
  • bpo-19154: AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.
  • 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 = 'https://github.com/orsenthil'
    closed_at = None
    created_at = <Date 2008-07-22.17:31:20.034>
    labels = ['docs']
    title = 'httplib.HTTPResponse documentations inconsistent'
    updated_at = <Date 2019-01-24.23:57:14.299>
    user = 'https://bugs.python.org/ThomasH'

    bugs.python.org fields:

    activity = <Date 2019-01-24.23:57:14.299>
    actor = 'demian.brecht'
    assignee = 'orsenthil'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2008-07-22.17:31:20.034>
    creator = 'ThomasH'
    dependencies = ['19154']
    files = []
    hgrepos = []
    issue_num = 3430
    keywords = []
    message_count = 5.0
    messages = ['70158', '107442', '108857', '108861', '199158']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'orsenthil', 'ezio.melotti', 'eric.araujo', 'ThomasH', 'mvolz']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3430'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    @ThomasH
    Copy link
    Mannequin Author

    ThomasH mannequin commented Jul 22, 2008

    The library reference documentation of httplib.HTTPResponse does not
    match up with the online help documentation, or with the dir()
    information of a particular instance.

    E.g. the list of public features in the library reference
    (http://docs.python.org/lib/httpresponse-objects.html) is:

    • read
    • getheader
    • getheaders
    • msg
    • version
    • status
    • reason

    From the online documentation (with 'help(httplib.HTTPResponse)'):

    • begin
    • close
    • getheader
    • getheaders
    • isclosed
    • read

    And from a class instance (via 'dir(httpResponseInstance)'):

    • 'begin',
    • 'chunk_left',
    • 'chunked',
    • 'close',
    • 'debuglevel',
    • 'fp',
    • 'getheader',
    • 'getheaders',
    • 'isclosed',
    • 'length',
    • 'msg',
    • 'read',
    • 'reason',
    • 'status',
    • 'strict',
    • 'version',
    • 'will_close'

    @ThomasH ThomasH mannequin assigned birkenfeld Jul 22, 2008
    @ThomasH ThomasH mannequin added the docs Documentation in the Doc dir label Jul 22, 2008
    @terryjreedy
    Copy link
    Member

    Docs have been considerably updated since 2.5. Please check if this still applies to the 2.7 docs

    @ThomasH
    Copy link
    Mannequin Author

    ThomasH mannequin commented Jun 28, 2010

    Still applies. Neither the 2.7 documentation has changed (judging from the current online dev docs), nor the implementation (judging from current svn). So my first two lists are still valid. I cannot comment on the third, as I don't have a 2.7 installation at hand, or will have any time soon.

    @orsenthil
    Copy link
    Member

    Yes, I know httplib documentation needs improvement. There is a great deal of documentation in the module itself. A lot can be .rst'ifed.

    @orsenthil orsenthil assigned orsenthil and unassigned birkenfeld Jun 28, 2010
    @terryjreedy
    Copy link
    Member

    Docs are still as deficient in 3.3, and so I presume in 3.4.

    Part of the discrepancy between the first two lists is that data attributes msg, version, status, and reason are instance-only attributes.

    bpo-19154 is (now) about improving fileno doc. That, some other methods, are missing doctrings, making help(method) useless.

    A big change in 3.x is that HTTPResponse now subclasses io.RawIOBase and hence inherits or implements even more (undocumented) methods than listed here. I suppose they could be documented by reference to the base class, if that is the normal procedure when subclassing.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants