summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb
Commit message (Collapse)AuthorAgeFilesLines
* Fixes bug #1117761Gregory P. Smith2006-04-121-7/+9
| | | | | | | | | bsddb.*open() methods cachesize parameter wouldn't work (raised an internal bsddb.db exception when it was given). The set_cachesize call needed to be moved from the DB object to the DBEnv since the env was introduced to allow for threading. (will backport to 2.4)
* Closes bug #1149413Gregory P. Smith2006-04-121-1/+1
| | | | | | | Using None for a filename with the 'n' flag when calling bsddb.btopen would cause an error while checking if the file None existed. error not likely to be seen as anyone using None for a filename would likely use the 'c' flag in the first place.
* Fix bsddb.db.DBError derived exceptions so they can be unpickled.Gregory P. Smith2006-04-082-0/+76
| | | | | Also adds some backwards compatibility when compiling _bsddb.c on earlier python versions (needed for pybsddb).
* Plug the last 657 referenceleaks in test_bsddb3: a circular referenceThomas Wouters2006-03-121-0/+5
| | | | | | | between a TestCase instance, the database it opened (or a cursor to a database) and a bound method as a registered database callback, and a lack of GC-handling in bsddb caused the TestCases to linger. Fix the test, for now, as backward compatibility makes adding GC to bsddb annoying.
* Whitespace normalization.Tim Peters2006-02-201-1/+1
|
* Bug #1210377: close bsddb cursor correctly after NotFoundError.Georg Brandl2006-02-201-1/+4
|
* Add a unit test for bug fix #1396678.Georg Brandl2006-02-192-6/+11
|
* Bug #1396678: a closed bsddb.DB raises AttributeError on repr().Georg Brandl2006-02-191-1/+4
| | | | It now returns "{}". Is that the correct solution?
* fix test import for use in standalone pybsddb project bsddb3 module as wellGregory P. Smith2006-01-291-1/+6
| | | | as python builtin bsddb.
* Add wrapper for DBEnv.set_tx_timeout method to allow time based DB_RECOVERGregory P. Smith2006-01-272-0/+5
| | | | (test cases and dbobj wrapping)
* Fix bug #1413192, fix seg fault in bsddb if a txn was deleted before the env.Neal Norwitz2006-01-252-0/+22
| | | | Will backport.
* Get BSD DB working most for version 3.2Neal Norwitz2005-10-201-0/+2
|
* fix import to work with either module name.Gregory P. Smith2005-06-091-1/+6
|
* Tools/scripts/reindent.py _is_ your friendAnthony Baxter2005-06-084-116/+116
|
* fix more Errors (not Failures) when run using BerkeleyDB <= 4.0Gregory P. Smith2005-06-061-4/+13
|
* fix Errors (not Failures) in test cases when running with BerkeleyDB<4.2Gregory P. Smith2005-06-061-32/+61
|
* make the tests that expect uncatchable exceptions from a callback testGregory P. Smith2005-06-061-19/+48
| | | | | | for them in a roundabout way (catching and parsing stderr) keeps test output clean.
* test case for pybsddb SF bug id 1215432Gregory P. Smith2005-06-061-0/+50
|
* test DB.associate using transactions. somewhat related to SF pybsddbGregory P. Smith2005-06-061-12/+46
| | | | bug #1215432
* pybsddb 4.3.2:Gregory P. Smith2005-06-042-9/+33
| | | | | | | | | | | * the has_key() method was not raising a DBError when a database error had occurred. [SF patch id 1212590] * added a wrapper for the DBEnv.set_lg_regionmax method [SF patch id 1212590] * DBKeyEmptyError now derives from KeyError just like DBNotFoundError. * internally everywhere DB_NOTFOUND was checked for has been updated to also check for DB_KEYEMPTY. This fixes the semantics of a couple operations on recno and queue databases to be more intuitive and results in less unexpected DBKeyEmptyError exceptions being raised.
* Whitespace normalization.Tim Peters2005-06-031-186/+186
|
* pybsddb 4.3.1, adds support for DB.set_bt_compare database btree comparisonGregory P. Smith2005-06-033-0/+218
| | | | | | functions written in python. contributed by <frederic.gobry@epfl.ch>
* Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.Martin v. Löwis2005-03-031-2/+2
| | | | Backported to 2.4.
* Simplify string comparison using startswith()Steve Holden2005-02-021-1/+1
|
* Purged Berkeley code of references to the long-obsolete whrandom.Tim Peters2004-08-083-5/+4
|
* Whitespace normalization, via reindent.py.Tim Peters2004-07-181-3/+3
|
* Adds support for DB.pget and DBCursor.pget methods.Gregory P. Smith2004-06-282-0/+27
| | | | | Based on a patch supplied by Ian Ward <ian@arevco.ca> on the pybsddb mailing list 2004-03-26.
* SF patch / bug #967763Gregory P. Smith2004-06-271-0/+9
| | | | | | | | | | | | Fix memory leaks revealed by valgrind and ensuing code inspection. In the existing test suite valgrind revealed two memory leaks (DB_get and DBC_set_range). Code inspection revealed that there were many other potential similar leaks (many on odd code error paths such as passing something other than a DBTxn object for a txn= parameter or in the face of an out of memory error). The most common case that would cause a leak was when using recno or queue format databases with integer keys, sometimes only with an exception exit.
* Fix SF bug # 897820 - we can no longer use the DB_TRUNCATE flag whenGregory P. Smith2004-06-271-6/+11
| | | | | | opening the DB to implement legacy interface flag='n' support as BerkeleyDB 4.2.52 no longer allows it in transaction protected environments. Do the os.unlink ourselves.
* * supply a more useful error message when append() is called on theGregory P. Smith2004-03-161-2/+8
| | | | | wrong type of database in dbshelve. * fix a typo in the exception name when checking args
* bugfix for people executing test_all to run the test suite. (call theGregory P. Smith2004-03-161-1/+1
| | | | correct function)
* Fixes SF bug # 778421Gregory P. Smith2004-02-263-4/+29
| | | | | | | | | * Fixed a bug in the compatibility interface set_location() method where it would not properly search to the next nearest key when used on BTree databases. [SF bug id 788421] * Fixed a bug in the compatibility interface set_location() method where it could crash when looking up keys in a hash or recno format database due to an incorrect free().
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-125-14/+14
| | | | From SF patch #852334.
* __init__.py: keep it compatible with older python (True and False == 1 and 0)Gregory P. Smith2004-01-132-6/+17
| | | | test_basics.py: updated for the set_get_returns_none() default of 2 change.
* * Use weakref's of DBCursor objects for the iterator cursors to avoid aGregory P. Smith2003-11-031-47/+45
| | | | | | | | | | memory leak that would've occurred for all iterators that were destroyed before having iterated until they raised StopIteration. * Simplify some code. * Add new test cases to check for the memleak and ensure that mixing iteration with modification of the values for existing keys works.
* * Fix the singlethreaded deadlocks occurring in the simple bsddb interface.Gregory P. Smith2003-11-021-7/+102
| | | | | * Add support for multiple iterator/generator objects at once on the simple bsddb _DBWithCursor interface.
* bsddb3 4.2.2, adds DBCursor.get_current_size() method to return the lengthGregory P. Smith2003-10-011-36/+36
| | | | of the current value without reading the value itself.
* Use a threadsafe private DBEnv for each bsddb compatibility interfaceGregory P. Smith2003-09-271-3/+10
| | | | | | | db that is opened. DB_THREAD and DB_INIT_LOCK allow for multithreaded access. DB_PRIVATE prevents the DBEnv from using the filesystem (making it only usable by this process; and in this implementation using one DBEnv per bsddb database)
* Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; newGregory P. Smith2003-09-2120-66/+70
| | | | | | | | | | features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb.
* Maintain backwards compatibility with python < 2.3 by dynamicallyGregory P. Smith2003-09-201-18/+30
| | | | adding the iterator interface for python >= 2.3.
* The previous change works much faster (one lookup per key) whenRaymond Hettinger2003-09-131-0/+9
| | | | iteritems() is defined.
* SF #662923Raymond Hettinger2003-09-121-1/+10
| | | | | | Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed.
* Support DBEnv.set_shm_key() to allow multi-threaded multi-processGregory P. Smith2003-08-281-0/+2
| | | | database environments to use shared memory on systems supporting it.
* readerThread(): Add max_retries to both DeadlockWrap() calls. ThisBarry Warsaw2003-07-211-2/+2
| | | | may cause some tests to fail but it prevents them from hanging.
* test01_join(): Fix a test failure when run with "python -O". TheBarry Warsaw2003-07-211-1/+4
| | | | setting of sCursor happened in an assert.
* fix to work on python <= 2.1Gregory P. Smith2003-07-091-2/+2
|
* bugfix: proper import bsddb exists belowGregory P. Smith2003-07-091-1/+0
|
* bsddb 4.1.6:Gregory P. Smith2003-07-095-10/+174
| | | | | | | | | | | * Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item.
* Wrap the cursor functions with dbutils.DeadlockWrap to deal with theGregory P. Smith2003-05-281-2/+2
| | | | expected DBLockDeadLockErrors.
* Whitespace normalization.Tim Peters2003-04-243-5/+1
|