[Python-ideas] Replacing shelve in the next 3.x release.

Yuval Greenfield ubershmekel at gmail.com
Mon May 7 21:20:56 CEST 2012


On Mon, May 7, 2012 at 9:50 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Mon, 7 May 2012 19:43:17 +0100
> Jakob Bowyer <jkbbwr at gmail.com> wrote:
> > I suggest that we either replace the internals of shelve, or deprecate
> > it, or remove it in favour of other dbm's like
> > http://packages.python.org/sqlite3dbm/dbm.html. Many people feel that
> > shelve is a pointless module that should not be used because it relies
> > too much on pickle an insecure format,
>
> pickle is only insecure if you want to accept data from untrusted
> sources. shelve would obviously be very bad for an exchange format, but
> I don't think that's what it's used for.
>
> Someone should post a proper comparison of shelve with its alternatives
> (including functionality and performance) before a decision is made.
>
> Regards
>
> Antoine.
>
>
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.

Yuval
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120507/360f8e19/attachment.html>


More information about the Python-ideas mailing list