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: Path used for HTTP PUT request doesn't match the description
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: EvensF, docs@python, kushal.das, orsenthil, python-dev
Priority: normal Keywords: patch

Created on 2014-04-15 00:36 by EvensF, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue21229.patch EvensF, 2014-04-16 00:00 Patch file with the modification asked review
Messages (8)
msg216257 - (view) Author: Evens Fortuné (EvensF) * Date: 2014-04-15 00:36
In the Python Standard Library, at the end of :
 - Section "20.7.3. Examples" of "20.7. httplib — HTTP protocol client" (for Python 2.7.6) 
 - Section "20.10.3. Examples" of "20.10. http.client — HTTP protocol client" (for Python 3.2.5)
 - Section "21.12.3. Examples" of "21.12. http.client — HTTP protocol client" (for Python 3.3.5, Python 3.4.0, and Python 3.5a0)

the last example is described this way (change httplib for http.client for Python 3.2+):

--------

>>> # This creates an HTTP message
>>> # with the content of BODY as the enclosed representation
>>> # for the resource http://localhost:8080/foobar
...
>>> import httplib
>>> BODY = "***filecontents***"
>>> conn = httplib.HTTPConnection("localhost", 8080)
>>> conn.request("PUT", "/file", BODY)
>>> response = conn.getresponse()
>>> print response.status, response.reason
200, OK

--------

Is it possible that the request method should have been called this way:

conn.request("PUT", "/foobar", BODY)
                      ^^^^^^
Thank you
msg216264 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-04-15 01:27
A simple docs patch would definitely help here. Thanks for the bug report.
msg216270 - (view) Author: Evens Fortuné (EvensF) * Date: 2014-04-15 01:51
Do you have some documentation on how to do a "docs patch" ?

I'm sorry this is the first time I'm reporting a bug.
msg216274 - (view) Author: Kushal Das (kushal.das) * (Python committer) Date: 2014-04-15 03:20
You should have a look at the following guides:

https://docs.python.org/devguide/docquality.html
https://docs.python.org/devguide/patch.html
msg216275 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-04-15 03:22
Sure, here is the information on how to create a patch - https://docs.python.org/devguide/

It could feel that there are multiple steps, but the process is easy.
msg216410 - (view) Author: Evens Fortuné (EvensF) * Date: 2014-04-16 00:00
Is it what you asked?
msg216647 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-17 03:33
New changeset 57c66f85942d by Senthil Kumaran in branch '3.4':
Correct the URL in the http.client example. Noted by Evens Fortuné. Closes #21229
http://hg.python.org/cpython/rev/57c66f85942d
msg216648 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2014-04-17 03:34
Yes. And thanks for the patch. I applied a slight variation of it.
History
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65428
2014-04-17 03:34:25orsenthilsetmessages: + msg216648
2014-04-17 03:33:40python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg216647

resolution: fixed
stage: resolved
2014-04-16 00:00:36EvensFsetfiles: + issue21229.patch
keywords: + patch
messages: + msg216410
2014-04-15 03:22:21orsenthilsetmessages: + msg216275
2014-04-15 03:20:46kushal.dassetnosy: + kushal.das
messages: + msg216274
2014-04-15 01:51:24EvensFsetmessages: + msg216270
2014-04-15 01:27:49orsenthilsetnosy: + orsenthil
messages: + msg216264
2014-04-15 00:36:23EvensFcreate