[Checkins] SVN: five.pt/trunk/ Avoid another case of unconditionally attempting to Acquisition wrap template files. We do have an interface check for this.

Hanno Schlichting plone at hannosch.info
Tue Mar 10 10:38:08 EDT 2009


Log message for revision 97803:
  Avoid another case of unconditionally attempting to Acquisition wrap template files. We do have an interface check for this.
  

Changed:
  U   five.pt/trunk/CHANGES.txt
  U   five.pt/trunk/setup.py
  U   five.pt/trunk/src/five/pt/patches.py

-=-
Modified: five.pt/trunk/CHANGES.txt
===================================================================
--- five.pt/trunk/CHANGES.txt	2009-03-10 13:56:23 UTC (rev 97802)
+++ five.pt/trunk/CHANGES.txt	2009-03-10 14:38:07 UTC (rev 97803)
@@ -1,9 +1,15 @@
 Changelog
 =========
 
-five.pt 0.5 (released 2/17/2009)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+0.6 - unreleased
+~~~~~~~~~~~~~~~~
 
+- Avoid another case of unconditionally attempting to Acquisition wrap
+  template files. We do have an interface check for this. [hannosch]
+
+0.5 - 2009-02-17
+~~~~~~~~~~~~~~~~
+
 - Added test function to template context. [malthe]
 
 - Fixed edge-case (special case?) where the view of a

Modified: five.pt/trunk/setup.py
===================================================================
--- five.pt/trunk/setup.py	2009-03-10 13:56:23 UTC (rev 97802)
+++ five.pt/trunk/setup.py	2009-03-10 14:38:07 UTC (rev 97803)
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = '0.5'
+version = '0.6dev'
 
 setup(name='five.pt',
       version=version,

Modified: five.pt/trunk/src/five/pt/patches.py
===================================================================
--- five.pt/trunk/src/five/pt/patches.py	2009-03-10 13:56:23 UTC (rev 97802)
+++ five.pt/trunk/src/five/pt/patches.py	2009-03-10 14:38:07 UTC (rev 97803)
@@ -65,8 +65,11 @@
     if template is _marker:
         self._template = template = BaseTemplateFile(self.filename)
 
-    return template.__of__(self)(self, *args, **kw)
+    if IAcquirer.providedBy(template):
+        template = template.__of__(self)
 
+    return template(self, *args, **kw)
+
 FiveViewPageTemplateFile.__get__ = get_bound_template
 ZopeViewPageTemplateFile.__get__ = get_bound_template
 PageTemplateFile.__call__ = call_template



More information about the Checkins mailing list