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.

classification
Title: http.client.HTTPConnection.putrequest incorrect arguments
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, orsenthil, p0lm, python-dev
Priority: normal Keywords: easy, patch

Created on 2016-09-07 23:37 by p0lm, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
103351.patch orsenthil, 2016-09-08 21:25 review
Messages (3)
msg274913 - (view) Author: (p0lm) Date: 2016-09-07 23:37
Currently the arguments for HTTPConnection.putrequest in the http.client documentation are listed as "request, selector, skip_host=False, skip_accept_encoding=False". This does not reflect the correct arguments:
>>> from http.client import HTTPConnection
>>> help(HTTPConnection.putrequest)

putrequest(self, method, url, skip_host=0, skip_accept_encoding=0)
    Send a request to the server.
    
    `method' specifies an HTTP request method, e.g. 'GET'.
    `url' specifies the object being requested, e.g. '/index.html'.
    `skip_host' if True does not add automatically a 'Host:' header
    `skip_accept_encoding' if True does not add automatically an
       'Accept-Encoding:' header

Fix:
Change `request` and `selector` to `method` and `url` respectively.
msg275160 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2016-09-08 21:25
This patch fixes this. It makes the documentation consistent with the code.
msg275167 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-08 21:30
New changeset f6b62cf4a436 by Senthil Kumaran in branch '3.5':
Issue28010 - Make http.client.HTTPConnection.putrequest documentation consistent with the code.
https://hg.python.org/cpython/rev/f6b62cf4a436

New changeset 93c7a893f9b4 by Senthil Kumaran in branch 'default':
[merge from 3.5] - Issue28010 - Make http.client.HTTPConnection.putrequest
https://hg.python.org/cpython/rev/93c7a893f9b4
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72197
2016-09-08 21:30:43orsenthilsetstatus: open -> closed
stage: needs patch -> resolved
resolution: fixed
versions: + Python 3.6
2016-09-08 21:30:13python-devsetnosy: + python-dev
messages: + msg275167
2016-09-08 21:25:02orsenthilsetfiles: + 103351.patch

nosy: + orsenthil
messages: + msg275160

keywords: + patch
2016-09-08 06:18:42martin.pantersetkeywords: + easy
stage: needs patch
2016-09-07 23:37:10p0lmcreate