[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
DTML.py:1.10.6.2
Tres Seaver
tseaver at zope.com
Mon Jan 12 16:39:16 EST 2004
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv8958/lib/python/AccessControl
Modified Files:
Tag: Zope-2_6-branch
DTML.py
Log Message:
- Collector #1169: ensure that safe version of 'min' and 'max' are
available in the DTML namespace. Note that we can only test for this
stuff under AccessControl; the "safe" versions of the builtins aren't
available in DocumentTemplate, which should *not* import them from
AccessControl.
- testDTML.py: clean out conflict-generating cruft.
=== Zope/lib/python/AccessControl/DTML.py 1.10.6.1 => 1.10.6.2 ===
--- Zope/lib/python/AccessControl/DTML.py:1.10.6.1 Fri Jan 9 13:51:01 2004
+++ Zope/lib/python/AccessControl/DTML.py Mon Jan 12 16:38:45 2004
@@ -127,4 +127,10 @@
return r
DT_Util.TemplateDict.__dict__.update(DTMLSecurityAPI.__dict__)
-DT_Util.TemplateDict.__dict__.update(safe_builtins)
+
+_NEED_WRAPPING = ('max', 'min')
+
+for k, v in safe_builtins.items():
+ if k in _NEED_WRAPPING:
+ v = DT_Util.NotBindable(v)
+ DT_Util.TemplateDict.__dict__[k] = v
More information about the Zope-Checkins
mailing list