Message1380
 
            
            
            
 
   
   
 
 
  
      
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. | 
   
  
 
|
 
| Date | 
User | 
Action | 
Args | 
 
| 2008-02-20 17:17:39 | admin | link | issue1622207 messages |  
| 2008-02-20 17:17:39 | admin | create |  |  
 
 
 |