[Checkins] SVN: zope.container/branches/3.7.0.x/ back port the change in trunk from r99988 to this branch.

Paul Carduner paulcarduner at gmail.com
Fri May 15 18:23:02 EDT 2009


Log message for revision 99989:
  back port the change in trunk from r99988 to this branch.

Changed:
  U   zope.container/branches/3.7.0.x/CHANGES.txt
  U   zope.container/branches/3.7.0.x/buildout.cfg
  U   zope.container/branches/3.7.0.x/setup.py
  U   zope.container/branches/3.7.0.x/src/zope/container/ordered.py

-=-
Modified: zope.container/branches/3.7.0.x/CHANGES.txt
===================================================================
--- zope.container/branches/3.7.0.x/CHANGES.txt	2009-05-15 22:10:08 UTC (rev 99988)
+++ zope.container/branches/3.7.0.x/CHANGES.txt	2009-05-15 22:23:02 UTC (rev 99989)
@@ -2,6 +2,14 @@
 CHANGES
 =======
 
+3.7.0.1 (unreleased)
+--------------------
+
+- Fix a bug in OrderedContainer where trying to set the value for a
+  key that already exists (duplication error) would actually delete the
+  key from the order, leaving a dangling reference.
+
+
 3.7.0 (2009-01-31)
 ------------------
 

Modified: zope.container/branches/3.7.0.x/buildout.cfg
===================================================================
--- zope.container/branches/3.7.0.x/buildout.cfg	2009-05-15 22:10:08 UTC (rev 99988)
+++ zope.container/branches/3.7.0.x/buildout.cfg	2009-05-15 22:23:02 UTC (rev 99989)
@@ -1,14 +1,13 @@
 [buildout]
+extends = http://download.zope.org/zope3.4/3.4.0/versions.cfg
 develop = .
-    /home/wosc/gocept/grok/sprint/zope.app.broken
-    /home/wosc/gocept/grok/sprint/zope.testing
-    /home/wosc/gocept/grok/compattest
-parts = test graph compat
+parts = test graph
 versions = versions
 
 [versions]
 ZODB3 = 3.8
 zope.app.apidoc = 3.5
+zope.app.container = 3.7.0
 
 [test]
 recipe = zc.recipe.testrunner
@@ -17,10 +16,4 @@
 [graph]
 recipe = zc.recipe.egg
 eggs = ${test:eggs}
-       tl.eggdeps
-
-[compat]
-recipe = z3c.recipe.compattest
-use_svn = true
-svn_directory = /home/wosc/gocept/grok/sprint
-max_jobs = 5
+       tl.eggdeps
\ No newline at end of file

Modified: zope.container/branches/3.7.0.x/setup.py
===================================================================
--- zope.container/branches/3.7.0.x/setup.py	2009-05-15 22:10:08 UTC (rev 99988)
+++ zope.container/branches/3.7.0.x/setup.py	2009-05-15 22:23:02 UTC (rev 99989)
@@ -22,7 +22,7 @@
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
 setup(name='zope.container',
-      version = '3.7.0',
+      version = '3.7.0.1dev',
       author='Zope Corporation and Contributors',
       author_email='zope-dev at zope.org',
       description='Zope Container',

Modified: zope.container/branches/3.7.0.x/src/zope/container/ordered.py
===================================================================
--- zope.container/branches/3.7.0.x/src/zope/container/ordered.py	2009-05-15 22:10:08 UTC (rev 99988)
+++ zope.container/branches/3.7.0.x/src/zope/container/ordered.py	2009-05-15 22:23:02 UTC (rev 99989)
@@ -179,6 +179,13 @@
         ['foo', 'baz']
         >>> int(len(oc._order) == len(oc._data))
         1
+
+        >>> oc['foo'] = 'baz'
+        Traceback (most recent call last):
+        ...
+        DuplicationError: foo
+        >>> oc._order
+        ['foo', 'baz']
         """
 
         existed = self._data.has_key(key)
@@ -207,7 +214,8 @@
         try:
             setitem(self, self._data.__setitem__, key, object)
         except Exception, e:
-            self._order.remove(key)
+            if not existed:
+                self._order.remove(key)
             raise e
 
         return key



More information about the Checkins mailing list