[Zope-Checkins] CVS: Zope/lib/python/AccessControl - DTML.py:1.10.70.2 Implementation.py:1.1.2.2

Tres Seaver tseaver at zope.com
Mon Jan 12 18:59:11 EST 2004


Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv32086/lib/python/AccessControl

Modified Files:
      Tag: Zope-2_7-branch
	DTML.py Implementation.py 
Log Message:
 - Ensure that min, max, and sum are in DTML namespace (Collector #1169)


=== Zope/lib/python/AccessControl/DTML.py 1.10.70.1 => 1.10.70.2 ===
--- Zope/lib/python/AccessControl/DTML.py:1.10.70.1	Thu Jan  8 18:33:43 2004
+++ Zope/lib/python/AccessControl/DTML.py	Mon Jan 12 18:58:39 2004
@@ -19,7 +19,6 @@
 import SecurityManagement, string, math, whrandom, random
 import DocumentTemplate.sequence
 
-
 # RestrictedDTML is inserted by AccessControl.Implementation.
 
 


=== Zope/lib/python/AccessControl/Implementation.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/lib/python/AccessControl/Implementation.py:1.1.2.1	Thu Jan  8 18:33:43 2004
+++ Zope/lib/python/AccessControl/Implementation.py	Mon Jan 12 18:58:39 2004
@@ -88,3 +88,14 @@
 
 # start with the default, mostly because we need something for the tests
 setImplementation("C")
+
+from DocumentTemplate import DT_Util
+from ZopeGuards import safe_builtins
+
+_NEED_WRAPPING = ('max', 'min', 'iter', 'enumerate', 'sum')
+
+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