[Zope-Checkins] CVS: Zope2 - PythonScript.py:1.26.6.2 standard.py:1.4.44.2

shane@digicool.com shane@digicool.com
Thu, 26 Apr 2001 19:12:52 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/Products/PythonScripts
In directory korak:/tmp/cvs-serv14600/lib/python/Products/PythonScripts

Modified Files:
      Tag: RestrictedPythonBranch
	PythonScript.py standard.py 
Log Message:
Moved ZopeGuards.py to AccessControl.  Now full_read_guard, a highly
useful utility, is easily found.



--- Updated File PythonScript.py in package Zope2 --
--- PythonScript.py	2001/04/26 03:06:42	1.26.6.1
+++ PythonScript.py	2001/04/26 23:12:20	1.26.6.2
@@ -103,11 +103,11 @@
 from AccessControl import getSecurityManager
 from OFS.History import Historical, html_diff
 from OFS.Cache import Cacheable
-from RestrictedPython import ZopeGuards
+from AccessControl import full_read_guard, full_write_guard, safe_builtins
 from RestrictedPython.Utilities import utility_builtins
 from zLOG import LOG, ERROR, INFO, PROBLEM
 
-safe_builtins = ZopeGuards.safe_builtins.copy()
+safe_builtins = safe_builtins.copy()
 safe_builtins.update(utility_builtins)
 
 # Track the Python bytecode version
@@ -294,9 +294,9 @@
     def _newfun(self, code):
         g = {'__debug__': __debug__,
              '__builtins__': safe_builtins,
-             '_read_guard_': ZopeGuards.full_read_guard,
-             '_write_guard_': ZopeGuards.full_write_guard,
-             '_print_target_class': RestrictedPython.PrintCollector
+             '_read_': full_read_guard,
+             '_write_': full_write_guard,
+             '_print_': RestrictedPython.PrintCollector
              }
         l = {}
         exec code in g, l

--- Updated File standard.py in package Zope2 --
--- standard.py	2001/04/26 22:25:09	1.4.44.1
+++ standard.py	2001/04/26 23:12:20	1.4.44.2
@@ -105,7 +105,7 @@
  html_quote, url_quote, url_quote_plus, newline_to_br, thousands_commas
 
 from Globals import HTML
-from RestrictedPython.ZopeGuards import full_read_guard
+from AccessControl import full_read_guard
 
 security.declarePublic('DTML')
 class DTML(HTML):