[Checkins] SVN: z3c.pt/trunk/ Provide ``econtext`` to the zope traverser instead of just ``request``.

Malthe Borch mborch at gmail.com
Fri Jan 6 13:50:11 UTC 2012


Log message for revision 123967:
  Provide ``econtext`` to the zope traverser instead of just ``request``.

Changed:
  U   z3c.pt/trunk/CHANGES.txt
  U   z3c.pt/trunk/src/z3c/pt/expressions.py

-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt	2012-01-06 11:58:06 UTC (rev 123966)
+++ z3c.pt/trunk/CHANGES.txt	2012-01-06 13:50:10 UTC (rev 123967)
@@ -1,6 +1,11 @@
 Changelog
 =========
 
+In next release ...
+
+- The ``ZopeTraverser`` class now gets ``econtext`` instead of the
+  name ``request``.
+
 2.1.5 (2011-11-24)
 ~~~~~~~~~~~~~~~~~~
 

Modified: z3c.pt/trunk/src/z3c/pt/expressions.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/expressions.py	2012-01-06 11:58:06 UTC (rev 123966)
+++ z3c.pt/trunk/src/z3c/pt/expressions.py	2012-01-06 13:50:10 UTC (rev 123967)
@@ -53,10 +53,11 @@
     def __init__(self, proxify=identity):
         self.proxify = proxify
 
-    def __call__(self, base, request, call, *path_items):
+    def __call__(self, base, econtext, call, *path_items):
         """See ``zope.app.pagetemplate.engine``."""
 
         if bool(path_items):
+            request = econtext.get('request')
             path_items = list(path_items)
             path_items.reverse()
 
@@ -165,7 +166,7 @@
                 components = ()
 
         call = template(
-            "traverse(base, request, call)",
+            "traverse(base, econtext, call)",
             traverse=self.traverser,
             base=load(base),
             call=load(str(not nocall)),



More information about the checkins mailing list