[issue839159] iterators broken for weak dicts

2010-07-23 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: It looks like this issue has been fixed in issue7105 already. Can we close this ticket? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue839159

[issue839159] iterators broken for weak dicts

2010-07-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It's not yet fixed in 2.7 or 2.6. Updating versions. -- nosy: +mark.dickinson versions: +Python 2.6 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue839159] iterators broken for weak dicts

2010-07-23 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: We might as well backport Antoine's patch rather than take this one (even if mine for 2.x already). It would be weird to have 2 wildly different patches to solve the same problem. Maybe close this ticket and flag issue7105 for backporting?

[issue839159] iterators broken for weak dicts

2010-07-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Agreed. -- resolution: - duplicate status: open - closed superseder: - weak dict iterators are fragile because of unpredictable GC runs ___ Python tracker rep...@bugs.python.org

[issue839159] iterators broken for weak dicts

2010-07-14 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: If this is to go forward the patch will need porting to 2.7, 3.1 and 3.2 -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker

[issue839159] iterators broken for weak dicts

2010-05-06 Thread Anthony Lenton
Anthony Lenton anthony.len...@canonical.com added the comment: Probably old news, but this also affects 2.5.4. -- nosy: +elachuni versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue839159

[issue839159] iterators broken for weak dicts

2010-05-03 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: I can confirm that the patch applies with minimal fuzz to the release26-maint branches and the trunk, and that the added tests fail without the updated implementation in both cases. Furthermore, Jim's original demo script emits it error with

[issue839159] iterators broken for weak dicts

2009-02-14 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Patch has tests, may need updating. -- nosy: +ajaksu2 stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue839159 ___

[issue839159] iterators broken for weak dicts

2009-02-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Interesting patch. I think the intermediate assertEquals in test_weak_*_dict_flushed_dead_items_when_iters_go_out are just testing an implementation detail, only the final one should remain. Also, it is likely the code duplication you are talking

[issue839159] iterators broken for weak dicts

2009-02-14 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: About duplicated code and performance: When I look at the duplicated code, I don't see anything that remotely looks like a performance tweak. Just to make sure, I made a bench: #!/usr/bin/env python import sys sys.path.insert(0, 'Lib')

[issue839159] iterators broken for weak dicts

2009-02-14 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: Oh, that's me again not correctly reading my own tests. It's the *_are_not_held_* tests that test that no reference is kept. I agree about the *_flushed_dead_items_* being an implementation detail. ___

[issue839159] iterators broken for weak dicts

2009-02-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Results without the patch: ./python.exe weakref_bench.py 0.804216861725 Results with the patch: $ ./python.exe weakref_bench.py 0.813000202179 Thanks for the numbers, I see my worries were unfounded. About the

[issue839159] iterators broken for weak dicts

2008-02-24 Thread Virgil Dupras
Virgil Dupras added the comment: I made a patch to fix the problem. The cleaning up of they weakref keys or values will be held until all references to iterators created by the weakdict are dead. I also couldn't resist removing code duplication of code in items(), keys() and values(). At

[issue839159] iterators broken for weak dicts

2008-02-22 Thread A.M. Kuchling
Changes by A.M. Kuchling: -- title: interators broken for weak dicts - iterators broken for weak dicts Tracker [EMAIL PROTECTED] http://bugs.python.org/issue839159 ___