<div dir="ltr"><div class="gmail_quote">On Mon, May 7, 2012 at 9:50 PM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, 7 May 2012 19:43:17 +0100<br>
Jakob Bowyer <<a href="mailto:jkbbwr@gmail.com">jkbbwr@gmail.com</a>> wrote:<br>
> I suggest that we either replace the internals of shelve, or deprecate<br>
> it, or remove it in favour of other dbm's like<br>
> <a href="http://packages.python.org/sqlite3dbm/dbm.html" target="_blank">http://packages.python.org/sqlite3dbm/dbm.html</a>. Many people feel that<br>
> shelve is a pointless module that should not be used because it relies<br>
> too much on pickle an insecure format,<br>
<br>
</div>pickle is only insecure if you want to accept data from untrusted<br>
sources. shelve would obviously be very bad for an exchange format, but<br>
I don't think that's what it's used for.<br>
<br>
Someone should post a proper comparison of shelve with its alternatives<br>
(including functionality and performance) before a decision is made.<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888"><br>
Antoine.<br>
</font></span><div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>I used shelve for a long time on multiple projects as it's really easy to use but I had to deal with random data corruption on abrupt process termination. That was my motivator to implement an sqlite backend for shelve though I guess I wasn't motivated strongly enough to follow through.<div>
<br></div><div>Yuval</div></div></div></div>