classification
Title: urllib.request.urlopen() cadefault argument is documented with wrong default value
Type: behavior Stage:
Components: Documentation Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, orsenthil, python-dev
Priority: normal Keywords:

Created on 2013-05-14 15:31 by barry, last changed 2013-05-14 23:43 by orsenthil. This issue is now closed.

Messages (3)
msg189228 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2013-05-14 15:31
The docs[1] say:

.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True)

The code[2] says:

def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
            *, cafile=None, capath=None, cadefault=False):

Obviously, the code cannot be changed in a stable release, and whether the default should be changed for 3.4 is a separate discussion.  For now, the docs should be fixed to reflect the code.

[1] Doc/library/urllib.request.rst
[2] Lib/urllib/request.py
msg189229 - (view) Author: Roundup Robot (python-dev) Date: 2013-05-14 15:38
New changeset e2288953e9f1 by Barry Warsaw in branch '3.3':
- Issue #17977: The documentation for the cadefault argument's default value
http://hg.python.org/cpython/rev/e2288953e9f1

New changeset 85ecc4761a6c by Barry Warsaw in branch 'default':
- Issue #17977: The documentation for the cadefault argument's default value
http://hg.python.org/cpython/rev/85ecc4761a6c
msg189257 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2013-05-14 23:43
OMG. That's a glaring mistake. Thanks for fixing it.
History
Date User Action Args
2013-05-14 23:43:44orsenthilsetnosy: + orsenthil
messages: + msg189257
2013-05-14 15:39:46barrysetstatus: open -> closed
resolution: fixed
2013-05-14 15:38:50python-devsetnosy: + python-dev
messages: + msg189229
2013-05-14 15:31:19barrycreate