Message1380

Author codepage
Recipients
Date 2007-02-06.03:10:09
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The attached patch solved my problem with weakref. My repro case is below.

from weakref import *
wvd = WeakValueDictionary()
try:
    wvd_hash = hash(wvd)
except Exception,e:
    print e, "this was expected"

try:
    wvd_ref = ref(wvd)
    print wvd_ref
except Exception, e:
    print e, "this exception was NOT expected, running under jython"



foo@foo-desktop:~/jython_dev$ python weakref_bug.py 
unhashable instance this was expected
<weakref at 0xb7dbdfcc; to 'instance' at 0xb7dbbcec>
foo@foo-desktop:~/jython_dev$ jython weakref_bug.py 
unhashable instance this was expected
<weakref 1; to 'instance' object>

If we could get any comments from a core jython dev on this bug that would be great.
History
Date User Action Args
2008-02-20 17:17:39adminlinkissue1622207 messages
2008-02-20 17:17:39admincreate