Issue 13050: RLock support the context manager protocol but this is not documented (original) (raw)

Created on 2011-09-27 19:02 by r.david.murray, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue13050.diff zacherates,2012-01-07 22:32 review
Messages (6)
msg145260 - (view) Author: Brian Brazil (bbrazil) * Date: 2011-10-09 15:05
This is already documented: http://docs.python.org/library/threading.html#using-locks-conditions-and-semaphores-in-the-with-statement
msg145268 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-10-09 15:51
Hmm. But what I did was look up the RLock section of the manual to answer the question "does this support the context manager protocol", and the answer appeared to be no. In a reference manual I would expect all the important features of an object to be described in that object's documentation, or linked to therefrom.
msg150824 - (view) Author: Aaron Maenpaa (zacherates) Date: 2012-01-07 22:32
Here is a patch that adds an note about using Locks, RLocks, Conditions, and Semaphores as context managers to each of their descriptions as well as a link to the "Using locks, conditions, and semaphores in the with statement" section.
msg150828 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012-01-07 23:13
This edit looks reasonable.
msg159535 - (view) Author: Michal Nowikowski (godfryd) Date: 2012-04-28 20:10
It looks that it is already documented by 76228:2040842626ba changeset. The bug can be closed.
msg186905 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-04-14 10:31
Thanks, closing.
History
Date User Action Args
2022-04-11 14:57:21 admin set github: 57259
2013-04-14 10:31:29 georg.brandl set status: open -> closednosy: + georg.brandlmessages: + resolution: out of date
2012-04-28 20:10:55 godfryd set nosy: + godfrydmessages: +
2012-01-07 23:13:44 rhettinger set nosy: + rhettingermessages: +
2012-01-07 22:32:26 zacherates set files: + issue13050.diffversions: + Python 3.3nosy: + zacheratesmessages: + keywords: + patch
2011-10-09 15:51:45 r.david.murray set messages: +
2011-10-09 15:05:15 bbrazil set nosy: + bbrazilmessages: +
2011-09-27 19:02:06 r.david.murray create