Message903
In Jython 2.3a0, (as in Python 2.3) the
WeakValueDictionary.__makeremove method in Lib/weakref.py
relies on being able to make a weakref of self. In Jython, this
raises an exception, because _weakref.ref(x) requires x to be
hashable (which WeakValueDictionary is not). In Python,
_weakref.ref(x) works on unhashable objects.
The problem did not arise in Jython 2.1, as the code in Lib/weakref
did not try to create a weakref to itself (and so resulted in hash
tables containing circular references).
Possible fixes off the top of my head:
(better) Fix _weakref.java so it doesn't require a hashable object.
(easier) Don't bother creating a weakref to self in
WeakValueDictionary.__makeremove since Jython can GC circular
references.
There are probably similar problems in other parts of weakref.py |
|
Date |
User |
Action |
Args |
2008-02-20 17:17:18 | admin | link | issue947306 messages |
2008-02-20 17:17:18 | admin | create | |
|