[Checkins] SVN: zc.dict/branches/tlotze-blist/ changes due to the branch review by Gary:

Thomas Lotze tl at gocept.com
Wed Mar 4 14:01:12 EST 2009


Log message for revision 97482:
  changes due to the branch review by Gary:
  - made generations really optional
  - added a comment about performance without the better reordering API planned
  

Changed:
  U   zc.dict/branches/tlotze-blist/CHANGES.txt
  U   zc.dict/branches/tlotze-blist/buildout.cfg
  D   zc.dict/branches/tlotze-blist/src/zc/dict/configure.zcml
  U   zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.py
  U   zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.txt

-=-
Modified: zc.dict/branches/tlotze-blist/CHANGES.txt
===================================================================
--- zc.dict/branches/tlotze-blist/CHANGES.txt	2009-03-04 18:45:41 UTC (rev 97481)
+++ zc.dict/branches/tlotze-blist/CHANGES.txt	2009-03-04 19:01:12 UTC (rev 97482)
@@ -1,7 +1,11 @@
 1.3 (unreleased)
 ----------------
 
-* changed the implementation of OrderedDict to store the order in buckets
+* Changed the implementation of OrderedDict to store the order in buckets
+  using zc.blist. At present, this improves performance only for those
+  operations that add or remove single items of an OrderedDict. Reordering the
+  existing items still results in the order being rewritten as a whole. A
+  better, more granular reordering API is planned for a future release.
 
 1.2.1 (2007-3-5)
 ----------------

Modified: zc.dict/branches/tlotze-blist/buildout.cfg
===================================================================
--- zc.dict/branches/tlotze-blist/buildout.cfg	2009-03-04 18:45:41 UTC (rev 97481)
+++ zc.dict/branches/tlotze-blist/buildout.cfg	2009-03-04 19:01:12 UTC (rev 97482)
@@ -1,9 +1,14 @@
 [buildout]
 develop = .
-parts = test py
+parts = test test-generations py
 
 [test]
 recipe = zc.recipe.testrunner
+eggs = zc.dict
+defaults = ["-v", "-c"]
+
+[test-generations]
+recipe = zc.recipe.testrunner
 eggs = zc.dict [generations]
 defaults = ["-v", "-c"]
 

Deleted: zc.dict/branches/tlotze-blist/src/zc/dict/configure.zcml
===================================================================
--- zc.dict/branches/tlotze-blist/src/zc/dict/configure.zcml	2009-03-04 18:45:41 UTC (rev 97481)
+++ zc.dict/branches/tlotze-blist/src/zc/dict/configure.zcml	2009-03-04 19:01:12 UTC (rev 97482)
@@ -1,5 +0,0 @@
-<configure xmlns="http://namespaces.zope.org/zope">
-
-  <include package=".generations" />
-
-</configure>

Modified: zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.py
===================================================================
--- zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.py	2009-03-04 18:45:41 UTC (rev 97481)
+++ zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.py	2009-03-04 19:01:12 UTC (rev 97482)
@@ -22,6 +22,11 @@
 
 
 def evolve(context):
+    """Upgrade the order storage of those OrderedDicts which can be reached
+    through a hierarchy of mappings. Applications that use OrderedDicts as
+    internal data structures need to take care of upgrading themselves.
+
+    """
     root = context.connection.root()
     for obj in zope.app.generations.utility.findObjectsMatching(
         root, lambda obj: isinstance(obj, zc.dict.OrderedDict)):

Modified: zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.txt
===================================================================
--- zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.txt	2009-03-04 18:45:41 UTC (rev 97481)
+++ zc.dict/branches/tlotze-blist/src/zc/dict/generations/evolve1.txt	2009-03-04 19:01:12 UTC (rev 97482)
@@ -8,6 +8,10 @@
 into using BLists. The evolution of database generation 1 handles the
 conversion of these structures.
 
+Note: It does so only for those OrderedDicts which can be reached through a
+hierarchy of mappings. Applications that use OrderedDicts as internal data
+structures need to take care of upgrading themselves.
+
 Let's create some ordered dicts [testdb]_:
 
 >>> from zc.dict import OrderedDict



More information about the Checkins mailing list