[Checkins] SVN: five.formlib/trunk/ Added backwards compatibility support with Zope 2.12. The protectClass function has moved. Also include our own meta.zcml into the tests runs to get a higher coverage.

Hanno Schlichting hannosch at hannosch.eu
Tue Dec 29 20:36:00 EST 2009


Log message for revision 107335:
  Added backwards compatibility support with Zope 2.12. The protectClass function has moved. Also include our own meta.zcml into the tests runs to get a higher coverage.
  

Changed:
  U   five.formlib/trunk/CHANGES.txt
  U   five.formlib/trunk/src/five/formlib/metaconfigure.py
  U   five.formlib/trunk/src/five/formlib/tests/configure.zcml

-=-
Modified: five.formlib/trunk/CHANGES.txt
===================================================================
--- five.formlib/trunk/CHANGES.txt	2009-12-30 01:02:45 UTC (rev 107334)
+++ five.formlib/trunk/CHANGES.txt	2009-12-30 01:36:00 UTC (rev 107335)
@@ -4,6 +4,9 @@
 1.0.1 - unreleased
 ------------------
 
+* Added backwards compatibility support with Zope 2.12. The protectClass
+  function has moved. Also include our own meta.zcml into the tests runs to
+  get a higher coverage.
 
 1.0 - 2009-12-26
 ----------------

Modified: five.formlib/trunk/src/five/formlib/metaconfigure.py
===================================================================
--- five.formlib/trunk/src/five/formlib/metaconfigure.py	2009-12-30 01:02:45 UTC (rev 107334)
+++ five.formlib/trunk/src/five/formlib/metaconfigure.py	2009-12-30 01:36:00 UTC (rev 107335)
@@ -27,9 +27,12 @@
 from zope.app.form.browser.metaconfigure import BaseFormDirective
 from zope.browser.interfaces import IAdding
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+# BBB Zope 2.12
+try:
+    from AccessControl.security import protectClass
+except ImportError:
+    from Products.Five.security import protectClass
 
-from AccessControl.security import protectClass
-
 from five.formlib import EditView, AddView
 from Products.Five.metaclass import makeClass
 from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile

Modified: five.formlib/trunk/src/five/formlib/tests/configure.zcml
===================================================================
--- five.formlib/trunk/src/five/formlib/tests/configure.zcml	2009-12-30 01:02:45 UTC (rev 107334)
+++ five.formlib/trunk/src/five/formlib/tests/configure.zcml	2009-12-30 01:36:00 UTC (rev 107335)
@@ -6,6 +6,8 @@
     xmlns:i18n="http://namespaces.zope.org/i18n"
     i18n_domain="formtest">
 
+  <include package="five.formlib" file="meta.zcml" />
+
   <!-- make the zope2.Public permission work -->
   <meta:redefinePermission from="zope2.Public" to="zope.Public" />
 
@@ -93,7 +95,6 @@
 
   <i18n:registerTranslations directory="locales"/>
 
-
   <browser:page
     name="add_content"
     for="*"



More information about the checkins mailing list