[Checkins] SVN: z3c.baseregistry/trunk/ Ensure that original registry restoring action is performed last.

Dan Korostelev nadako at gmail.com
Mon Jan 12 07:29:31 EST 2009


Log message for revision 94693:
  Ensure that original registry restoring action is performed last.
  Remove "Version" word from versions in CHANGES.txt.

Changed:
  U   z3c.baseregistry/trunk/CHANGES.txt
  U   z3c.baseregistry/trunk/src/z3c/baseregistry/zcml.py

-=-
Modified: z3c.baseregistry/trunk/CHANGES.txt
===================================================================
--- z3c.baseregistry/trunk/CHANGES.txt	2009-01-12 09:47:18 UTC (rev 94692)
+++ z3c.baseregistry/trunk/CHANGES.txt	2009-01-12 12:29:30 UTC (rev 94693)
@@ -2,7 +2,18 @@
 CHANGES
 =======
 
-Version 1.0.0 (2008-01-24)
---------------------------
+1.0.1 (unreleased)
+------------------
 
+- Ensure that original registry restoring action is
+  performed last, by specifying sys.maxint order for it.
+  This is a workaround for bug that appears when there's
+  actions with specified (large) order, so original registry
+  is restored _before_ that action is executed. One of
+  examples is _checkViewFor action in zope.app.publisher's
+  addMenuItem directive.
+
+1.0.0 (2008-01-24)
+------------------
+
 - Initial Release

Modified: z3c.baseregistry/trunk/src/z3c/baseregistry/zcml.py
===================================================================
--- z3c.baseregistry/trunk/src/z3c/baseregistry/zcml.py	2009-01-12 09:47:18 UTC (rev 94692)
+++ z3c.baseregistry/trunk/src/z3c/baseregistry/zcml.py	2009-01-12 12:29:30 UTC (rev 94693)
@@ -16,6 +16,8 @@
 $Id$
 """
 __docformat__ = "reStructuredText"
+import sys
+
 import zope.interface
 import zope.component.globalregistry
 import zope.configuration.config
@@ -111,6 +113,7 @@
         self.context.action(
             discriminator=None,
             callable=resetOriginalRegistry,
-            args=(self,)
+            args=(self,),
+            order=sys.maxint,
             )
 



More information about the Checkins mailing list