[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/ Forward port
fixes for collector #1621 and #1894 from the 2.8 branch.
Tres Seaver
tseaver at palladion.com
Tue Nov 22 10:49:55 EST 2005
Log message for revision 40319:
Forward port fixes for collector #1621 and #1894 from the 2.8 branch.
Changed:
U Zope/branches/2.9/lib/python/AccessControl/DTML.py
U Zope/branches/2.9/lib/python/DocumentTemplate/DT_Util.py
U Zope/branches/2.9/lib/python/Products/PythonScripts/help/PythonScript.py
U Zope/branches/2.9/lib/python/RestrictedPython/Utilities.py
-=-
Modified: Zope/branches/2.9/lib/python/AccessControl/DTML.py
===================================================================
--- Zope/branches/2.9/lib/python/AccessControl/DTML.py 2005-11-22 15:46:15 UTC (rev 40318)
+++ Zope/branches/2.9/lib/python/AccessControl/DTML.py 2005-11-22 15:49:55 UTC (rev 40319)
@@ -15,11 +15,13 @@
$Id$
"""
from DocumentTemplate import DT_Util
-import SecurityManagement, string, math, whrandom, random
+import SecurityManagement, string, math, random
import DocumentTemplate.sequence
from ZopeGuards import safe_builtins
+whrandom = random # BBB: will be removed in Zope 2.10
+
# RestrictedDTML is inserted by AccessControl.Implementation.
@@ -27,7 +29,6 @@
DT_Util.TemplateDict.__allow_access_to_unprotected_subobjects__=1
string.__allow_access_to_unprotected_subobjects__=1
math.__allow_access_to_unprotected_subobjects__=1
-whrandom.__allow_access_to_unprotected_subobjects__=1
random.__allow_access_to_unprotected_subobjects__=1
DocumentTemplate.sequence.__allow_access_to_unprotected_subobjects__=1
Modified: Zope/branches/2.9/lib/python/DocumentTemplate/DT_Util.py
===================================================================
--- Zope/branches/2.9/lib/python/DocumentTemplate/DT_Util.py 2005-11-22 15:46:15 UTC (rev 40318)
+++ Zope/branches/2.9/lib/python/DocumentTemplate/DT_Util.py 2005-11-22 15:49:55 UTC (rev 40319)
@@ -315,8 +315,11 @@
- Special security-aware versions of 'getattr' and 'hasattr',
- - The Python 'string', 'math', and 'whrandom' modules, and
+ - The Python 'string', 'math', modules,
+ - BBB alias for the Python 'whrandom' module (will be removed in
+ Zope 2.10),
+
- A special function, 'test', that supports if-then expressions.
The 'test' function accepts any number of arguments. If the
first argument is true, then the second argument is returned,
Modified: Zope/branches/2.9/lib/python/Products/PythonScripts/help/PythonScript.py
===================================================================
--- Zope/branches/2.9/lib/python/Products/PythonScripts/help/PythonScript.py 2005-11-22 15:46:15 UTC (rev 40318)
+++ Zope/branches/2.9/lib/python/Products/PythonScripts/help/PythonScript.py 2005-11-22 15:49:55 UTC (rev 40319)
@@ -54,7 +54,10 @@
o math
- o whrandom and random
+ o random
+
+ o whrandom (deprecated in Python; aliased BBB support will be
+ removed in Zope 2.10).
o Products.PythonScripts.standard
Modified: Zope/branches/2.9/lib/python/RestrictedPython/Utilities.py
===================================================================
--- Zope/branches/2.9/lib/python/RestrictedPython/Utilities.py 2005-11-22 15:46:15 UTC (rev 40318)
+++ Zope/branches/2.9/lib/python/RestrictedPython/Utilities.py 2005-11-22 15:49:55 UTC (rev 40319)
@@ -13,7 +13,7 @@
__version__='$Revision: 1.7 $'[11:-2]
-import string, math, random, whrandom
+import string, math, random
import DocumentTemplate.sequence
from DateTime.DateTime import DateTime
@@ -22,7 +22,7 @@
utility_builtins['string'] = string
utility_builtins['math'] = math
utility_builtins['random'] = random
-utility_builtins['whrandom'] = whrandom
+utility_builtins['whrandom'] = random # BBB: will be removed in Zope 2.10
utility_builtins['sequence'] = DocumentTemplate.sequence
utility_builtins['DateTime'] = DateTime
More information about the Zope-Checkins
mailing list