New issue 2146: WeakKeyDictionary has some bugs https://bitbucket.org/pypy/pypy/issues/2146/weakkeydictionary-has-some-bugs
kmod: It looks like PyPy uses the CPython implementation of WeakKeyDictionary and WeakValueDictionary, but that implementation relies on quick destruction. It looks like PyPy (2.6.0) has a fix for the WeakValueDictionary case, but WeakKeyDictionary has the same issue (the callback can be postponed to the point that it removes the wrong entry from the dict). Here's Pyston's solution (and corresponding test), which I think should work for PyPy but I haven't tested it: https://github.com/dropbox/pyston/commit/28dc1184d7b2178df4e9bc00ae2e1eaffea575f9 _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue