[Python-ideas] shelve and sqlite

Yuval Greenfield ubershmekel at gmail.com
Fri Aug 5 10:36:49 CEST 2011


Hi Pydeas,

I encountered exceptions like

  File
"c:\python27\lib\site-packages\filecache-0.67-py2.7.egg\filecache\__init__.py",
line 82, in function_with_cache
    rv = function.__db[key]
  File "c:\python27\lib\shelve.py", line 122, in __getitem__
    value = Unpickler(f).load()
cPickle.UnpicklingError: could not find MARK


With my filecache module which I have a feeling are related to database
failures upon abrupt termination of the process.

If I write the class SqliteShelf, would it be of use to anyone? Would it be
a viable patch for shelve.py?

Note that I don't mean to affect the shelve.py "open" function, just to add
a reliable alternative class.

http://docs.python.org/dev/library/shelve.html

Cheers,

--Yuval Greenfield
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110805/58e65e91/attachment.html>


More information about the Python-ideas mailing list