Ian Ward wrote:
That really shouldn't be necessary, there must be a problem with the way
I'm using the WeakKeyDictionary in the canvas cache module.
I'll try to look look at it tonight.
John, please try the attached patch and verify that it works for you.
Ian
diff -r 13f105139a62 urwid/canvas.py
--- a/urwid/canvas.py Sat May 31 17:04:45 2008
+++ b/urwid/canvas.py Fri Jun 6 12:52:46 2008
@@ -109,6 +109,7 @@
def cleanup(cls, ref):
cls.cleanups += 1
w = cls._refs.get(ref, None)
+ del cls._refs[ref]
if not w:
return
widget, size, focus = w
@@ -122,9 +123,9 @@
if not sizes:
try:
del cls._widgets[widget]
+ del cls._deps[widget]
except KeyError:
pass
- del cls._refs[ref]
cleanup = classmethod(cleanup)
def clear(cls):
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid