final build
Use WeakKeyDictionary() instead of WeakSet().

WeakSet() was added in python 2.7 and we need to work with 2.6.