[Checkins] SVN: five.pt/trunk/ From Zope 2.12 onwards,	do not acquisition-wrap content provider.
    Malthe Borch 
    mborch at gmail.com
       
    Fri Nov 28 09:15:06 EST 2008
    
    
  
Log message for revision 93424:
  From Zope 2.12 onwards, do not acquisition-wrap content provider.
Changed:
  U   five.pt/trunk/CHANGES.txt
  U   five.pt/trunk/src/five/pt/expressions.py
-=-
Modified: five.pt/trunk/CHANGES.txt
===================================================================
--- five.pt/trunk/CHANGES.txt	2008-11-28 14:06:04 UTC (rev 93423)
+++ five.pt/trunk/CHANGES.txt	2008-11-28 14:15:06 UTC (rev 93424)
@@ -4,6 +4,9 @@
 HEAD
 ----
 
+- From Zope 2.12 onwards, do not acquisition-wrap content
+  provider. [malthe]
+
 - Split out CMF-related code to separate package. [malthe]
 
 - Compatibility changes to support Zope 2.10. [malthe]
Modified: five.pt/trunk/src/five/pt/expressions.py
===================================================================
--- five.pt/trunk/src/five/pt/expressions.py	2008-11-28 14:06:04 UTC (rev 93423)
+++ five.pt/trunk/src/five/pt/expressions.py	2008-11-28 14:15:06 UTC (rev 93424)
@@ -15,6 +15,12 @@
 
 _marker = object()
 
+try:
+    import Products.Five.browser.providerexpression
+    AQ_WRAP_CP = True
+except ImportError:
+    AQ_WRAP_CP = False
+    
 class FiveTraverser(object):
     def __call__(self, base, request, call, *path_items):
         """See ``zope.app.pagetemplate.engine``."""
@@ -68,7 +74,7 @@
         if cp is None:
             raise ContentProviderLookupError(name)
 
-        if getattr(cp, '__of__', None) is not None:
+        if AQ_WRAP_CP and getattr(cp, '__of__', None) is not None:
             cp = cp.__of__(context)
 
         cp.update()
    
    
More information about the Checkins
mailing list