This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients
Date 2005-12-08.13:36:01
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=44345

> We also get this error, though not using Python, but C.
> I'm not sure why people are so eager to dismiss it as an
> issue here, however, for it might be something your Python
> is doing with the Berkeley DB interface which could be
> improved.

The anydbm module was written long before Berkeley DB
supported any sort of adequate locking mechanisms (in the
BDB 1.85 days).  It also supports multiple backends (dbm and
gdbm in particular).  The API it present to the user is of
little more than a dictionary that happens to be stored
on-disk.  To change its API at this point to use bsddb's
(and underlying it, BDB's) locking mechanisms is impossible,
as neither of the other underlying db backends supports
locking.

The right thing for the author to do in this case is
probably to use the new bsddb module directly and take
advantage of its locking features.  The shelve module's
functionality would be trivial to implement on top of that.
All it really does is transparently pickle the data written
to the disk.
History
Date User Action Args
2007-08-23 14:18:53adminlinkissue857909 messages
2007-08-23 14:18:53admincreate