ZODB v3.6.2 Release Notes
-
๐ Release date: 15-July-2006
DemoStorage
- (3.6.2) DemoStorage was unable to wrap base storages who did not have an '_oid' attribute: most notably, ZEO.ClientStorage (http://www.zope.org/Collectors/Zope/2016).
๐ Following is combined news from internal releases (to support ongoing ๐ Zope2 / Zope3 development). These are the dates of the internal releases:
- 3.6.1 27-Mar-2006
- 3.6.0 05-Jan-2006
- 3.6b6 01-Jan-2006
- 3.6b5 18-Dec-2005
- 3.6b4 04-Dec-2005
- 3.6b3 06-Nov-2005
- 3.6b2 25-Oct-2005
- 3.6b1 24-Oct-2005
- 3.6a4 07-Oct-2005
- 3.6a3 07-Sep-2005
- 3.6a2 06-Sep-2005
- 3.6a1 04-Sep-2005
๐ Removal of Features Deprecated in ZODB 3.4
๐ (3.6b2) ZODB 3.6 no longer contains features officially deprecated in the ๐ ZODB 3.4 release. These include:
get_transaction()
. Usetransaction.get()
instead.transaction.commit()
is a shortcut spelling oftransaction.get().commit()
, andtransaction.abort()
oftransaction.get().abort()
. Note that importing ZODB no longer installsget_transaction
as a name in Python's__builtin__
module either.The
begin()
method ofTransaction
objects. Use thebegin()
method of a transaction manager instead.transaction.begin()
is a shortcut spelling to call the default transaction manager'sbegin()
method.The
dt
argument toConnection.cacheMinimize()
.The
Connection.cacheFullSweep()
method. UsecacheMinimize()
instead.The
Connection.getTransaction()
method. Pass a transaction manager toDB.open()
instead.The
Connection.getLocalTransaction()
method. Pass a transaction manager toDB.open()
instead.The
cache_deactivate_after
andversion_cache_deactivate_after
arguments to theDB
constructor.The
temporary
,force
, andwaitflag
arguments toDB.open()
.DB.open()
no longer blocks (there's no longer a fixed limit on the number of open connections).The
transaction
andtxn_mgr
arguments toDB.open()
. Use thetransaction_manager
argument instead.The
getCacheDeactivateAfter
,setCacheDeactivateAfter
,getVersionCacheDeactivateAfter
andsetVersionCacheDeactivateAfter
methods ofDB
.
Persistent
โ (3.6.1) Suppressed warnings about signedness of characters when compiling under GCC 4.0.x. See http://www.zope.org/Collectors/Zope/2027.
(3.6a4) ZODB 3.6 introduces a change to the basic behavior of Persistent objects in a particular end case. Before ZODB 3.6, setting
obj._p_changed
to a true value whenobj
was a ghost was ignored:obj
remained a ghost, and gettingobj._p_changed
continued to returnNone
. Starting with ZODB 3.6,obj
is activated instead (unghostified), and its state is changed from the ghost state to the changed state. The new behavior is less surprising and more robust.(3.6b5) The documentation for
_p_oid
now specifies the concrete type of oids (in short, an oid is either None or a non-empty string).
Commit hooks
- (3.6a1) The
beforeCommitHook()
method has been replaced by the newaddBeforeCommitHook()
method, with a more-robust signature.beforeCommitHook()
is now deprecated, and will be removed in ZODB 3.8. Thanks to Julien Anguenot for contributing code and tests.
Connection management
- (3.6b6) When more than
pool_size
connections have been closed,DB
forgets the excess (overpool_size
) connections closed first. Python's cyclic garbage collection can take "a long time" to reclaim them (and may in fact never reclaim them if application code keeps strong references to them), but such forgotten connections can never be opened again, so their caches are now cleared at the timeDB
forgets them. Most applications won't notice a difference, but applications that open many connections, and/or store many large objects in connection caches, and/or store limited resources (such as RDB connections) in connection caches may benefit.
ZEO
- (3.6a4) Collector 1900. In some cases of pickle exceptions raised by
low-level ZEO communication code, callers of
marshal.encode()
could attempt to catch an exception that didn't actually exist, leading to an erroneousAttributeError
exception. Thanks to Tres Seaver for the diagnosis.
BaseStorage
- ๐ป (3.6a4) Nothing done by
tpc_abort()
should raise an exception. However, if something does (an error case),BaseStorage.tpc_abort()
left the commit lock in the acquired state, causing any later attempt to commit changes hang.
Multidatabase
- (3.6b1) The
database_name
for a database in a multidatabase collection can now be specified in a config file's<zodb>
section, as the value of the optional newdatabase_name
key. The.databases
attribute cannot be specified in a config file, but can be passed as the optional newdatabases
argument to theopen()
method of a ZConfig factory for typeZODBDatabase
. For backward compatibility, Zope 2.9 continues to allow using the name in its<zodb_db name>
config section as the database name (note that<zodb_db>
is defined by Zope, not by ZODB -- it's a Zope-specific extension of ZODB's<zodb>
section).
PersistentMapping
(3.6.1) PersistentMapping was inadvertently pickling volatile attributes (http://www.zope.org/Collectors/Zope/2052).
(3.6b4)
PersistentMapping
makes changes by apop()
method call persistent now (http://www.zope.org/Collectors/Zope/2036).(3.6a1) The
PersistentMapping
class has an__iter__()
method now, so that objects of this type work well with Python's iteration protocol. For example, ifx
is aPersistentMapping
(or Python dictionary, or BTree, orPersistentDict
, ...), thenfor key in x:
iterates over the keys ofx
,list(x)
creates a list containingx
's keys,iter(x)
creates an iterator forx
's keys, and so on.
Tools
- ๐ฒ (3.6b5) The changeover from zLOG to the logging module means that some tools need to perform minimal logging configuration themselves. Changed the zeoup script to do so and thus enable it to emit error messages.
BTrees
โ (3.6.1) Suppressed warnings about signedness of characters when compiling under GCC 4.0.x. See http://www.zope.org/Collectors/Zope/2027.
0๏ธโฃ (3.6a1) BTrees and Buckets now implement the
setdefault()
andpop()
methods. These are exactly like Python's dictionary methods of the same names, except thatsetdefault()
requires both arguments (and Python is likely to change to require both arguments too -- defaulting thedefault
argument toNone
has no viable use cases). Thanks to Ruslan Spivak for contributing code, tests, and documentation.(3.6a1) Collector 1873. It wasn't possible to construct a BTree or Bucket from, or apply their update() methods to, a PersistentMapping or PersistentDict. This works now.
ZopeUndo
- ๐ (3.6a4) Collector 1810. A previous bugfix (#1726) broke listing undoable transactions for users defined in a non-root acl_users folder. Zope logs a acl_users path together with a username (separated by a space) and this previous fix failed to take this into account.
Connection
- (3.6b5) An optimization for loading non-current data (MVCC) was
inadvertently disabled in
_setstate()
; this has been repaired.
๐ Documentation
โ (3.6b3) Thanks to Stephan Richter for converting many of the doctest files to ReST format. These are now chapters in the Zope 3 apidoc too.
(3.6b4) Several misspellings of "occurred" were repaired.
Development
(3.6a1) The source code for the old ExtensionClass-based Persistence package moved, from ZODB to the Zope 2.9 development tree. ZODB 3.5 makes no use of Persistence, and, indeed, the Persistence package could not be compiled from a ZODB release, since some of the C header files needed appear only in Zope.
(3.6a3) Re-added the
zeoctl
module, for the same reasonsmkzeoinst
was re-added (see below).(3.6a2) The
mkzeoinst
module was re-added to ZEO, because Zope3 has a script that expects to import it from there. ZODB'smkzeoinst
script was rewritten to invoke themkzeoinst
module.
transact
- (3.6b4) Collector 1959: The undocumented
transact
module no longer worked. It remains undocumented and untested, but thanks to Janko Hauser it's possible that it works again ;-).