From: SourceForge.net <no...@so...> - 2006-05-15 17:49:55
|
Bugs item #947306, was opened at 2004-05-03 22:02 Message generated for change (Settings changed) made by fwierzbicki You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=947306&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library >Group: Deferred Status: Open Resolution: None >Priority: 4 Submitted By: D Morley (rabidechidna) Assigned to: Nobody/Anonymous (nobody) Summary: 2.3a0 bug in weakref.WeakValueDictionary Initial Comment: 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 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=947306&group_id=12867 |