classification
Title: bsddb.dbshelve.DbShelf.append doesn't work
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, nnorwitz, polaar
Priority: normal Keywords:

Created on 2007-10-03 16:45 by polaar, last changed 2007-10-12 19:14 by gregory.p.smith. This issue is now closed.

Messages (4)
msg56219 - (view) Author: Steven Vereecken (polaar) Date: 2007-10-03 16:45
The check for DB_RECNO seems to do the opposite of what it's supposed to do:

    def append(self, value, txn=None):
        if self.get_type() != db.DB_RECNO:
            self.append = self.__append
            return self.append(value, txn=txn)
        raise db.DBError, "append() only supported when dbshelve opened
with filetype=dbshelve.db.DB_RECNO"
msg56356 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-10-12 05:34
Gregory, could you take a look at this?
msg56378 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2007-10-12 16:42
heh yep that does look like a bug.  Laughing at that one goes well with
this comment currently in test_dbshelve.py:

# TODO:  Add test cases for a DBShelf in a RECNO DB.

i'll fix it. :)
msg56382 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2007-10-12 19:14
Fixed in python trunk r58434, release25-maint r58435, py3k r58438
History
Date User Action Args
2007-10-12 19:14:44gregory.p.smithsetstatus: open -> closed
resolution: fixed
messages: + msg56382
versions: + Python 2.6, Python 3.0
2007-10-12 16:42:04gregory.p.smithsetmessages: + msg56378
2007-10-12 05:34:59nnorwitzsetassignee: gregory.p.smith
messages: + msg56356
components: + Extension Modules, - Library (Lib)
nosy: + gregory.p.smith, nnorwitz
2007-10-03 16:45:21polaarcreate