Message3885

Author terrence
Recipients terrence
Date 2008-12-08.08:36:41
SpamBayes Score 3.1303649e-10
Marked as misclassified No
Message-id <1228725402.46.0.577389265289.issue1194@psf.upfronthosting.co.za>
In-reply-to
Content
A minimal test case:

#!/usr/bin/jython
from __future__ import with_statement
from threading import Lock, RLock

def func_return():
        lock = Lock()
        with lock:
                return lock

if func_return()._is_owned(): print "FAIL!"
else print "OK"
# eof

After annotating __enter__ and __exit__ of RLock with print statements,
it appears that __exit__ is not getting called in this case, but is in
other similar cases (see more detailed attached test case for cases that
pass).  The jython I'm using was compiled from svn on 7 Dec 2008.
History
Date User Action Args
2008-12-08 08:36:42terrencesetrecipients: + terrence
2008-12-08 08:36:42terrencesetmessageid: <1228725402.46.0.577389265289.issue1194@psf.upfronthosting.co.za>
2008-12-08 08:36:42terrencelinkissue1194 messages
2008-12-08 08:36:41terrencecreate