Commit 7a907ca3 authored by Tres Seaver's avatar Tres Seaver

Collector #1621: Added BBB alias for 'whrandom' in AccessControl/DTML.py and...

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.
parent f24d8382
...@@ -26,6 +26,10 @@ Zope Changes ...@@ -26,6 +26,10 @@ Zope Changes
Bugs Fixed 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 - Collector #1954: DocumentTemplate.DT_String: remove non-XHTML
wart from error message. wart from error message.
......
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
$Id$ $Id$
""" """
from DocumentTemplate import DT_Util from DocumentTemplate import DT_Util
import SecurityManagement, string, math, whrandom, random import SecurityManagement, string, math, random
import DocumentTemplate.sequence import DocumentTemplate.sequence
from ZopeGuards import safe_builtins from ZopeGuards import safe_builtins
whrandom = random # BBB: will be removed in Zope 2.10
# RestrictedDTML is inserted by AccessControl.Implementation. # RestrictedDTML is inserted by AccessControl.Implementation.
...@@ -27,7 +29,6 @@ from ZopeGuards import safe_builtins ...@@ -27,7 +29,6 @@ from ZopeGuards import safe_builtins
DT_Util.TemplateDict.__allow_access_to_unprotected_subobjects__=1 DT_Util.TemplateDict.__allow_access_to_unprotected_subobjects__=1
string.__allow_access_to_unprotected_subobjects__=1 string.__allow_access_to_unprotected_subobjects__=1
math.__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 random.__allow_access_to_unprotected_subobjects__=1
DocumentTemplate.sequence.__allow_access_to_unprotected_subobjects__=1 DocumentTemplate.sequence.__allow_access_to_unprotected_subobjects__=1
......
...@@ -315,7 +315,10 @@ Python expression support ...@@ -315,7 +315,10 @@ Python expression support
- Special security-aware versions of 'getattr' and 'hasattr', - 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. - A special function, 'test', that supports if-then expressions.
The 'test' function accepts any number of arguments. If the The 'test' function accepts any number of arguments. If the
......
...@@ -54,7 +54,10 @@ class PythonScript: ...@@ -54,7 +54,10 @@ class PythonScript:
o math 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 Products.PythonScripts.standard
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
__version__='$Revision: 1.7 $'[11:-2] __version__='$Revision: 1.7 $'[11:-2]
import string, math, random, whrandom import string, math, random
import DocumentTemplate.sequence import DocumentTemplate.sequence
utility_builtins = {} utility_builtins = {}
...@@ -21,7 +21,7 @@ utility_builtins = {} ...@@ -21,7 +21,7 @@ utility_builtins = {}
utility_builtins['string'] = string utility_builtins['string'] = string
utility_builtins['math'] = math utility_builtins['math'] = math
utility_builtins['random'] = random 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['sequence'] = DocumentTemplate.sequence
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment