New submission from Alexey <[email protected]>: When storing objects with defined __del__ method (even with only 'pass') in WeakValueDictionary, sometimes they disappear suddenly from dict. Attached script raises assertion error when bug is catched. Run it several times and wait 5-10 seconds (well, it's rather stable for me in 2-5 seconds).
You can remove __del__ method and bug disappears. Checked on pypy2.2.0 and 2.2.1 (both are buggy). CPython2.7 and 3.3 checked also - no bugs. Also it seems the but is not in WeakValueDictionary, because I implemented it's variant with a couple of needed methods using just dict and weakref.ref's and the bug still applies. ---------- files: bug.py messages: 6523 nosy: hellman, pypy-issue priority: bug status: unread title: WeakValueDictionary and __del__ ________________________________________ PyPy bug tracker <[email protected]> <https://bugs.pypy.org/issue1687> ________________________________________ _______________________________________________ pypy-issue mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-issue
