Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs
[issue14205] Raise an error if a dict is modified during a lookup
 

Index | Next | Previous | View Flat


report at bugs

Mar 6, 2012, 8:54 AM


Views: 290
Permalink
[issue14205] Raise an error if a dict is modified during a lookup [In reply to]

STINNER Victor <victor.stinner [at] gmail> added the comment:

> Can't this be triggered by non-malicious code that just happened to have a python comparison and get hit with a thread switch?

The issue was triggered without threads.If the __eq__ method of the
objects used for keys use C functions releasing the GIL, you may
trigger the issue.

> Would it be worth adding a counter to lookdict, so that one modification is OK, but 5 aren't?

If you implement a special type modifying the dict that contains the
object, you should implement your own retry function on lookup failure
(catch RuntimeError).

Honestly, if you get RuntimeError, you should change your program, not
retry the lookup!

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14205>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Subject User Time
[issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 1:19 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 1:20 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 2:14 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 3:28 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 3:43 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 3:49 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 3:50 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 5, 2012, 4:13 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 8:35 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 8:54 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 8:56 AM
        [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 9:21 AM
        [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 9:43 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 8:59 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 9:29 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 10:05 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 6, 2012, 12:33 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 7, 2012, 7:06 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 7, 2012, 5:50 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 8, 2012, 4:43 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 8, 2012, 4:50 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 8, 2012, 4:56 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 8, 2012, 5:01 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 8, 2012, 8:28 PM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 1:00 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 1:44 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 5:04 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 5:05 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 5:52 AM
    [issue14205] Raise an error if a dict is modified during a lookup report at bugs Mar 9, 2012, 1:59 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.