On Thu, Sep 4, 2008 at 11:03 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 04, 2008 at 07:40:28PM +0200, Jesus Cea wrote:
>> A stable fileformat is useful for long term support, but an evolving
>> format allows improvements.
>
>   Once I upgraded Python on a Windows computer... I think it was 2.2 to
> 2.3 upgrade - and all my bsddb databases stopped working. I cannot call
> this "improvement". I didn't have db_upgarde on that computer (or I didn't
> know about it). Does PyBSDDB have db_upgrade in the distribution? Does
> Python distribution have db_upgrade?

Unfortunately that is a bad example and should be blamed on python and
not berkeleydb:

Going from python 2.2 -> 2.3 was when the bsddb module was renamed to
bsddb185 and the bsddb3 module was included as bsddb.  It was an
incompatible change because the underlying library was entirely
replaced with something much much different despite happening to share
the name and being made to support the same API.

You could probably have built the bsddb185 module and loaded your data
from that and rewritten it using the new bsddb module.  The db upgrade
API is available in the bsddb.db module.  I never got around to
writing the automatic on disk format upgrade code for the
bsddb/__init__.py API.  It wouldn't have solved the 2.2->2.3 problem
but it would remove the need to know about db_upgrade in all future
versions.

fwiw, a precompiled berkeleydb with db_upgrade.exe and friends has
always been available from sleepycat/oracle so a solution exists even
if it wasn't nicely documented in a "reading your data when upgrading
python HOWTO."

>> Following your reasoning, Python should be
>> keep in 1.0 era, for compatibility sake.
>
>   Python? No. But persistent data structures? Yes! How many different
> pickle data formats there were since Python 1.0? What is the oldest
> pickle format modern Python can read? (Just using pickle as an example.)

Python by itself won't solve your long term data warehousing needs.

The SQLite project's on disk format has already changed at least once
(sqlite2 -> sqlite3) and no doubt it could change again in the future.

The lesson for python: when that happens lets write the code to make
the transition between formats trivial.

-gps
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to