[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-03-11 Thread R. David Murray
R. David Murray added the comment: Well, I don't think we are going to add an abort method in order to write a unit test, though it isn't completely out of the question. However, I've now looked at the code and the other comments in the file, and it is clear that great care is taken to allow

[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-03-01 Thread Ray.Allen
Ray.Allen added the comment: Here is a test case. First here is a patch which implements a simple builtin function "abort()" that calls exit(0) directly, it simulates the cases that Py_FatalError occurred or segment fault. Then run the following: import dbm.dumb as dumb db = dumb.open('tes

[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-02-28 Thread R. David Murray
R. David Murray added the comment: Can you construct a test case that demonstrates the corruption? -- nosy: +r.david.murray stage: -> test needed ___ Python tracker ___ ___

[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-02-28 Thread Ray.Allen
New submission from Ray.Allen : By reading the Lib/dbm/dumb.py source, there seems to be an distinct problem which is pointed out in comments: the __setitem__() should call self._commit() in order to keep .dat file and .dir file consist. Here is a piece of comment found at the end of __setitem