Log message for revision 40318: Collector #1621: Added BBB alias for 'whrandom' in AccessControl/DTML.py and RestrictedPython/Utilities.py. The alias will be removed in Zope 2.10. Collector #1894: updated docstrings, removing references to whrandom.
Changed: U Zope/branches/Zope-2_8-branch/doc/CHANGES.txt U Zope/branches/Zope-2_8-branch/lib/python/AccessControl/DTML.py U Zope/branches/Zope-2_8-branch/lib/python/DocumentTemplate/DT_Util.py U Zope/branches/Zope-2_8-branch/lib/python/Products/PythonScripts/help/PythonScript.py U Zope/branches/Zope-2_8-branch/lib/python/RestrictedPython/Utilities.py -=- Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt =================================================================== --- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2005-11-22 15:14:40 UTC (rev 40317) +++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2005-11-22 15:46:15 UTC (rev 40318) @@ -26,6 +26,10 @@ Bugs Fixed + - Collector #1621, #1894: Added BBB alias for 'whrandom' + in AccessControl/DTML.py and RestrictedPython/Utilities.py. The + alias will be removed in Zope 2.10. + - Collector #1954: DocumentTemplate.DT_String: remove non-XHTML wart from error message. Modified: Zope/branches/Zope-2_8-branch/lib/python/AccessControl/DTML.py =================================================================== --- Zope/branches/Zope-2_8-branch/lib/python/AccessControl/DTML.py 2005-11-22 15:14:40 UTC (rev 40317) +++ Zope/branches/Zope-2_8-branch/lib/python/AccessControl/DTML.py 2005-11-22 15:46:15 UTC (rev 40318) @@ -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/Zope-2_8-branch/lib/python/DocumentTemplate/DT_Util.py =================================================================== --- Zope/branches/Zope-2_8-branch/lib/python/DocumentTemplate/DT_Util.py 2005-11-22 15:14:40 UTC (rev 40317) +++ Zope/branches/Zope-2_8-branch/lib/python/DocumentTemplate/DT_Util.py 2005-11-22 15:46:15 UTC (rev 40318) @@ -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/Zope-2_8-branch/lib/python/Products/PythonScripts/help/PythonScript.py =================================================================== --- Zope/branches/Zope-2_8-branch/lib/python/Products/PythonScripts/help/PythonScript.py 2005-11-22 15:14:40 UTC (rev 40317) +++ Zope/branches/Zope-2_8-branch/lib/python/Products/PythonScripts/help/PythonScript.py 2005-11-22 15:46:15 UTC (rev 40318) @@ -54,8 +54,11 @@ 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 o Because it allows you to execute arbitrary python code, the python Modified: Zope/branches/Zope-2_8-branch/lib/python/RestrictedPython/Utilities.py =================================================================== --- Zope/branches/Zope-2_8-branch/lib/python/RestrictedPython/Utilities.py 2005-11-22 15:14:40 UTC (rev 40317) +++ Zope/branches/Zope-2_8-branch/lib/python/RestrictedPython/Utilities.py 2005-11-22 15:46:15 UTC (rev 40318) @@ -13,7 +13,7 @@ __version__='$Revision: 1.7 $'[11:-2] -import string, math, random, whrandom +import string, math, random import DocumentTemplate.sequence utility_builtins = {} @@ -21,7 +21,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 try: _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins