On Thu, Sep 4, 2008 at 11:03 AM, Oleg Broytmann <phd at phd.pp.ru> 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4