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: docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, cheryl.sabella, docs@python, gvanrossum, r.david.murray
Priority: normal Keywords:

Created on 2016-07-25 20:55 by gvanrossum, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1307 merged cheryl.sabella, 2017-04-26 17:38
PR 1894 merged cheryl.sabella, 2017-06-01 01:18
PR 1895 merged cheryl.sabella, 2017-06-01 01:19
Messages (9)
msg271305 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-07-25 20:55
The docs for threading.Lock say


79534:    .. versionchanged:: 3.3
79534:       Changed from a factory function to a class.

but the implementation in threading.py doesn't define a class named Lock, and in fact it is an alias for _thread.allocate_lock.

Are the docs wrong, or is the source? Or did this get changed back later?
msg271306 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-25 21:09
The relevant issue is #10968.  Apparently while editing the doc changes I caught the fact that RLock wasn't actually converted, but I missed the fact that Lock wasn't converted.  So, it is a doc error and should be corrected.
msg294886 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2017-05-31 23:58
*bump*

The PR was approved by R. David Murray a while ago.  I can backport once it's merged.

Thanks!
msg294887 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 00:14
New changeset 56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2 by Mariatta (csabella) in branch 'master':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307)
https://github.com/python/cpython/commit/56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2
msg294888 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 00:22
Thanks for the PR Cheryl. 

You can backport using cherry_picker.py 
Note that there's a recent update to it: https://github.com/python/core-workflow/tree/master/cherry_picker
msg294891 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2017-06-01 01:46
Thanks, Mariatta.  I've backported to 3.5 and 3.6 with the new cherry_picker instructions.
msg294893 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 01:53
New changeset 958e815fe014e9a3c64f3568b883c2a7b32a4e2e by Mariatta (csabella) in branch '3.5':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1895)
https://github.com/python/cpython/commit/958e815fe014e9a3c64f3568b883c2a7b32a4e2e
msg294894 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 01:53
New changeset 9abd0bf68f73b3beb56954e22740f0efcf04bc79 by Mariatta (csabella) in branch '3.6':
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894)
https://github.com/python/cpython/commit/9abd0bf68f73b3beb56954e22740f0efcf04bc79
msg294895 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-01 01:54
Thanks :)
History
Date User Action Args
2022-04-11 14:58:34adminsetgithub: 71805
2017-06-01 01:54:19Mariattasetstatus: open -> closed
versions: - Python 2.7
messages: + msg294895

resolution: fixed
stage: backport needed -> resolved
2017-06-01 01:53:26Mariattasetmessages: + msg294894
2017-06-01 01:53:11Mariattasetmessages: + msg294893
2017-06-01 01:46:10cheryl.sabellasetmessages: + msg294891
2017-06-01 01:19:15cheryl.sabellasetpull_requests: + pull_request1973
2017-06-01 01:18:27cheryl.sabellasetpull_requests: + pull_request1972
2017-06-01 00:22:40Mariattasetmessages: + msg294888
stage: patch review -> backport needed
2017-06-01 00:14:26Mariattasetnosy: + Mariatta
messages: + msg294887
2017-05-31 23:58:02cheryl.sabellasetnosy: + cheryl.sabella
messages: + msg294886
2017-05-01 19:42:07Mariattasetstage: patch review
versions: + Python 2.7, Python 3.7, - Python 3.3, Python 3.4
2017-04-26 17:38:18cheryl.sabellasetpull_requests: + pull_request1414
2016-07-25 23:00:40gvanrossumsetassignee: docs@python

nosy: + docs@python
components: + Documentation
versions: + Python 3.3, Python 3.4, Python 3.5, Python 3.6
2016-07-25 21:09:11r.david.murraysetnosy: + r.david.murray
messages: + msg271306
2016-07-25 20:55:03gvanrossumcreate