classification
Title: thread.lock.acquire docstring bug
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: arigo, docs@python, icordasc, python-dev, r.david.murray
Priority: normal Keywords: easy

Created on 2013-01-31 16:58 by arigo, last changed 2013-02-04 15:31 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
doc_fix.txt icordasc, 2013-02-04 02:54 review
Messages (6)
msg181035 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2013-01-31 16:58
The docstring of thread.lock.acquire() (or _thread on Python 3) is bogus: it says that if called without argument, the return value is None; it is only if called with a "blocking" argument that it returns True or False.  But since a long time it was always returning a boolean, never None.
msg181306 - (view) Author: Ian Cordasco (icordasc) * Date: 2013-02-04 02:15
Was this already taken care of? http://docs.python.org/2/library/thread.html?highlight=thread.lock#thread.lock.acquire and http://docs.python.org/3.3/library/_thread.html?highlight=thread.lock#_thread.lock.acquire don't make any mention of returning None.
msg181307 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-02-04 02:27
Armin is talking about the docstring, not the docs.  That is, what you get if you do help(x.acquire), where x is a Lock object, at the Python prompt.
msg181308 - (view) Author: Ian Cordasco (icordasc) * Date: 2013-02-04 02:54
Thanks. I couldn't find it in the source but I just found Modules/_threadmodule.c

I tested the method from the interpreter to confirm the changes I was making to the docstring. Attached is a diff that covers the change.
msg181333 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-04 15:30
New changeset 0cc51c04aa20 by R David Murray in branch '3.2':
#17091: update docstring for _thread.Lock.acquire.
http://hg.python.org/cpython/rev/0cc51c04aa20

New changeset b414b2dfd3d3 by R David Murray in branch '3.3':
merge #17091: update docstring for _thread.Lock.acquire.
http://hg.python.org/cpython/rev/b414b2dfd3d3

New changeset a80abb179ba1 by R David Murray in branch 'default':
merge #17091: update docstring for _thread.Lock.acquire.
http://hg.python.org/cpython/rev/a80abb179ba1

New changeset 20f0c5398e97 by R David Murray in branch '2.7':
#17091: update docstring for _thread.Lock.acquire.
http://hg.python.org/cpython/rev/20f0c5398e97
msg181335 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-02-04 15:31
Thanks, Ian.
History
Date User Action Args
2013-02-04 15:31:42r.david.murraysetstatus: open -> closed
versions: + Python 3.2
messages: + msg181335

resolution: fixed
stage: resolved
2013-02-04 15:30:18python-devsetnosy: + python-dev
messages: + msg181333
2013-02-04 02:54:26icordascsetfiles: + doc_fix.txt

messages: + msg181308
2013-02-04 02:28:03r.david.murraysetversions: + Python 3.3, Python 3.4, - Python 3.5
2013-02-04 02:27:34r.david.murraysetnosy: + r.david.murray
messages: + msg181307
2013-02-04 02:15:51icordascsetnosy: + icordasc
messages: + msg181306
2013-01-31 16:58:07arigocreate