ZODB v3.4.a1 Release Notes
-
๐ Release date: 01-Apr-2005
transaction
๐
get_transaction()
is officially deprecated now, and will be removed in ZODB 3.6. Use thetransaction
package instead. For example, instead of::import ZODB ... get_transaction().commit()
do::
import transaction ... transaction.commit()
DB
- There is no longer a hard limit on the number of connections that
DB.open()
will create. In other words,DB.open()
never blocks anymore waiting for an earlier connection to close, andDB.open()
always returns a connection now (while it wasn't documented, it was possible forDB.open()
to returnNone
before).
pool_size
continues to default to 7, but its meaning has changed: if more thanpool_size
connections are obtained fromDB.open()
and not closed, a warning is logged; if more than twicepool_size
, a critical problem is logged.pool_size
should be set to the maximum number of connections from theDB
instance you expect to have open simultaneously.In addition, if a connection obtained from
DB.open()
becomes unreachable without having been explicitly closed, when Python's garbage collection reclaims that connection it no longer counts against thepool_size
thresholds for logging messages.The following optional arguments to
DB.open()
are deprecated:transaction
,waitflag
,force
andtemporary
. If one is specified, its value is ignored, andDeprecationWarning
is raised. In ZODB 3.6, these optional arguments will be removed.- ๐ Lightweight support for "multi-databases" is implemented. These are collections of named DB objects and associated open Connections, such that the Connection for any DB in the collection can be obtained from a Connection from any other DB in the collection. See the new test file ZODB/tests/multidb.txt for a tutorial doctest. Thanks to Christian Theune for his work on this during the PyCon 2005 ZODB sprint.
ZEO compatibility
There are severe restrictions on using ZEO servers and clients at or after ๐ ZODB 3.3 with ZEO servers and clients from ZODB versions before 3.3. See the reworked
Compatibility
section inREADME.txt
for details. If ๐ possible, it will be easiest to move clients and servers to 3.3+ simultaneously. With care, it's possible to use a 3.3+ ZEO server with pre-3.3 ZEO clients, but not possible to use a pre-3.3 ZEO server with 3.3+ ZEO clients.BTrees
- A new family of BTree types, in the
IFBTree
module, map signed integers (32 bits) to C floats (also 32 bits). The intended use is to help construct search indices, where, e.g., integer word or document identifiers map to scores of some kind. This is easier than trying to work with scaled integer scores in anIIBTree
, and Zope3 has moved toIFBTrees
for these purposes in its search code.
FileStorage
- โ Addded a record iteration protocol to FileStorage. You can use the record iterator to iterate over all current revisions of data pickles in the storage.
In order to support calling via ZEO, we don't implement this as an actual iterator. An example of using the record iterator protocol is as follows::
storage = FileStorage('anexisting.fs') next_oid = None while True: oid, tid, data, next_oid = storage.record_iternext(next_oid) # do something with oid, tid and data if next_oid is None: break
The behavior of the iteration protocol is now to iterate over all current records in the database in ascending oid order, although this is not a promise to do so in the future.
Tools
๐ New tool fsoids.py, for heavy debugging of FileStorages; shows all ๐ uses of specified oids in the entire database (e.g., suppose oid 0x345620 is missing -- did it ever exist? if so, when? who referenced it? when was the last transaction that modified an object that referenced it? which objects did it reference? what kind of object was it?). โ ZODB/test/testfsoids.py is a tutorial doctest.
fsIndex
Efficient, general implementations of
minKey()
andmaxKey()
methods were added.fsIndex
is a special hybrid kind of BTree used to implement โ FileStorage indices. Thanks to Chris McDonough for code and tests.