classification
Title: make howto/urllib2.rst doctests pass
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: chris.jerdonek, docs@python, ezio.melotti, orsenthil, python-dev
Priority: normal Keywords: easy, patch

Created on 2012-09-11 13:28 by chris.jerdonek, last changed 2012-10-09 08:04 by orsenthil. This issue is now closed.

Files
File name Uploaded Description Edit
issue-doctest-howto-urllib-1.patch chris.jerdonek, 2012-09-11 13:28 review
Messages (5)
msg170305 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-09-11 13:28
This issue is to make the doctests in howto/urllib2.rst pass using vanilla doctest.

Patch attached.
msg170597 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-09-17 11:58
+    >>> try:
+    ...     urllib.request.urlopen(req)
+    ... except urllib.error.URLError as e:
+    ...    print("Error opening url.")
+    ...    # E.g. "[Errno 8] nodename nor servname provided, or not known"
+    ...    print("Reason:", e.reason)  #doctest: +ELLIPSIS
+    Error opening url.
+    Reason: ...

I think the previous version was clearer, so maybe this should be a skip.
msg172455 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-10-09 07:41
New changeset a6f37d503878 by Senthil Kumaran in branch '3.2':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/a6f37d503878

New changeset a24d3e2124b6 by Senthil Kumaran in branch '3.3':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/a24d3e2124b6

New changeset 8f699eac0908 by Senthil Kumaran in branch 'default':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/8f699eac0908
msg172457 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-10-09 07:55
Thanks, Senthil!
msg172458 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-10-09 08:03
New changeset b2f282991973 by Senthil Kumaran in branch '2.7':
Fix Issue 15922: make howto/urllib2.rst doctests pass.
http://hg.python.org/cpython/rev/b2f282991973
History
Date User Action Args
2012-10-09 08:04:42orsenthilsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2012-10-09 08:03:52python-devsetmessages: + msg172458
2012-10-09 07:55:19chris.jerdoneksetmessages: + msg172457
2012-10-09 07:41:05python-devsetnosy: + python-dev
messages: + msg172455
2012-09-17 11:58:07ezio.melottisetmessages: + msg170597
2012-09-15 03:00:31ezio.melottisetnosy: + ezio.melotti
type: enhancement
2012-09-11 13:28:34chris.jerdoneksetstage: patch review
2012-09-11 13:28:23chris.jerdonekcreate