[Zope-Checkins]
SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
Fix last remaining Five test failure by providing the ZPT traverser
Philipp von Weitershausen
philikon at philikon.de
Thu May 25 17:24:36 EDT 2006
Log message for revision 68293:
Fix last remaining Five test failure by providing the ZPT traverser
(boboTraverseAwareSimpleTraverse) with a request. Since zope.app has
already solved this problem (and I copied zope.app's approach in the
traverser), we can just simply reuse zope.app's code here. Yes, it
adds another dependency on zope.app, but at least we're not duplicating
code.
All Zope 2 tests should be passing now...
Changed:
U Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
-=-
Modified: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===================================================================
--- Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py 2006-05-25 21:10:12 UTC (rev 68292)
+++ Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py 2006-05-25 21:24:36 UTC (rev 68293)
@@ -18,7 +18,7 @@
$Id$
"""
from zope.interface import implements
-from zope.tales.tales import ExpressionEngine, Context, Iterator
+from zope.tales.tales import Context, Iterator
from zope.tales.expressions import PathExpr, StringExpr, NotExpr
from zope.tales.expressions import DeferExpr, SubPathExpr
from zope.tales.pythonexpr import PythonExpr
@@ -26,6 +26,7 @@
from zope.traversing.adapters import traversePathElement
from zope.contentprovider.tales import TALESProviderExpression
from zope.proxy import removeAllProxies
+import zope.app.pagetemplate.engine
import OFS.interfaces
from Acquisition import aq_base
@@ -133,16 +134,10 @@
domain, msgid, mapping=mapping,
context=context, default=default)
-class ZopeEngine(ExpressionEngine):
-
- def getContext(self, contexts=None, **kwcontexts):
- if contexts is not None:
- if kwcontexts:
- kwcontexts.update(contexts)
- else:
- kwcontexts = contexts
- return ZopeContext(self, kwcontexts)
+class ZopeEngine(zope.app.pagetemplate.engine.ZopeEngine):
+ _create_context = ZopeContext
+
class ZopeIterator(Iterator):
# The things below used to be attributes in
More information about the Zope-Checkins
mailing list