[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - Expressions.py:1.36.4.5 GlobalTranslationService.py:1.2.2.4 PageTemplate.py:1.25.4.5 PageTemplateFile.py:1.19.4.5 PythonExpr.py:1.8.4.4 TALES.py:1.31.4.4 ZopePageTemplate.py:1.42.4.7
Chris McDonough
chrism@zope.com
Sat, 26 Oct 2002 15:52:12 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv31373/lib/python/Products/PageTemplates
Modified Files:
Tag: chrism-install-branch
Expressions.py GlobalTranslationService.py PageTemplate.py
PageTemplateFile.py PythonExpr.py TALES.py ZopePageTemplate.py
Log Message:
Merge with HEAD. Again, sorry for the spew (what's left of it... someone seems to have filtered some of this branch's checkins out).
=== Zope/lib/python/Products/PageTemplates/Expressions.py 1.36.4.4 => 1.36.4.5 ===
=== Zope/lib/python/Products/PageTemplates/GlobalTranslationService.py 1.2.2.3 => 1.2.2.4 ===
=== Zope/lib/python/Products/PageTemplates/PageTemplate.py 1.25.4.4 => 1.25.4.5 ===
=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.19.4.4 => 1.19.4.5 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.19.4.4 Tue Oct 8 17:45:50 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py Sat Oct 26 15:51:42 2002
@@ -139,6 +139,15 @@
__roles__ = ComputedAttribute(_get__roles__, 1)
+ def getOwner(self, info=0):
+ """Gets the owner of the executable object.
+
+ This method is required of all objects that go into
+ the security context stack. Since this object came from the
+ filesystem, it is owned by no one managed by Zope.
+ """
+ return None
+
def __getstate__(self):
from ZODB.POSException import StorageError
raise StorageError, ("Instance of AntiPersistent class %s "
=== Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.8.4.3 => 1.8.4.4 ===
--- Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.8.4.3 Tue Oct 8 17:45:50 2002
+++ Zope/lib/python/Products/PageTemplates/PythonExpr.py Sat Oct 26 15:51:42 2002
@@ -47,7 +47,7 @@
# Bind template variables
names = {}
vars = econtext.vars
- getType = econtext._engine.getTypes().get
+ getType = econtext.getCompiler().getTypes().get
for vname in self._f_varnames:
val = vars.get(vname, _marker)
if val is _marker:
@@ -78,5 +78,5 @@
self._econtext = econtext
def __call__(self, text):
return self._handler(self._name, text,
- self._econtext._engine)(self._econtext)
+ self._econtext.getCompiler())(self._econtext)
=== Zope/lib/python/Products/PageTemplates/TALES.py 1.31.4.3 => 1.31.4.4 ===
--- Zope/lib/python/Products/PageTemplates/TALES.py:1.31.4.3 Tue Oct 8 17:45:51 2002
+++ Zope/lib/python/Products/PageTemplates/TALES.py Sat Oct 26 15:51:42 2002
@@ -152,8 +152,8 @@
position = (None, None)
source_file = None
- def __init__(self, engine, contexts):
- self._engine = engine
+ def __init__(self, compiler, contexts):
+ self._compiler = compiler
self.contexts = contexts
contexts['nothing'] = None
contexts['default'] = Default
@@ -170,6 +170,9 @@
# Keep track of what needs to be popped as each scope ends.
self._scope_stack = []
+ def getCompiler(self):
+ return self._compiler
+
def beginScope(self):
self._scope_stack.append([self.local_vars.copy()])
@@ -198,8 +201,8 @@
def setRepeat(self, name, expr):
expr = self.evaluate(expr)
if not expr:
- return self._engine.Iterator(name, (), self)
- it = self._engine.Iterator(name, expr, self)
+ return self._compiler.Iterator(name, (), self)
+ it = self._compiler.Iterator(name, expr, self)
old_value = self.repeat_vars.get(name)
self._scope_stack[-1].append((name, old_value))
self.repeat_vars[name] = it
@@ -208,7 +211,7 @@
def evaluate(self, expression,
isinstance=isinstance, StringType=StringType):
if isinstance(expression, StringType):
- expression = self._engine.compile(expression)
+ expression = self._compiler.compile(expression)
__traceback_supplement__ = (
TALESTracebackSupplement, self, expression)
return expression(self)
=== Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.42.4.6 => 1.42.4.7 ===