Will bsddb changes in 2.3 affect shelve files?

David Fox davidcfox at post.harvard.edu
Fri Jun 27 17:04:35 EDT 2003


I have a question about the upcoming changes to bsddb in Python 2.3, as 
described in the release notes.

I have an application which uses the shelve module to store selected 
attributes of a particular object and restore them the next time the 
application starts.  I've noticed that, under Python 2.2.2 for Windows, 
shelve appears to use bsddb for its underlying database.

Given that the bsddb files will need to be converted in format to work 
with Python 2.3, does that mean that my shelve files will have to be 
converted as well?

Can I (and the users of my application) use the same db2pickle/pickle2db 
utilities to convert files created/read by shelve?

Is the file format planned to remain stable after this transition to 
Python 2.3?  I've currently putting substantial effort into ensuring 
that I can add to the set of stored attributes, when necessary, without 
preventing my application from reading files created by earlier versions 
and without any loss of information.  However, all of that effort will 
be useless if the underlying database format used by shelve isn't stable.

Thanks in advance,
David Fox





More information about the Python-list mailing list