Skip to content

Commit

Permalink
Removed support for DocumentTemplate.sequence - this is handled in th…
Browse files Browse the repository at this point in the history
…e DocumentTemplate package itself.
  • Loading branch information
hannosch committed Jun 5, 2010
1 parent 3a91dde commit d13615f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Changes
=======

3.5.3 (unreleased)
3.6.0 (unreleased)
------------------

- Removed support for DocumentTemplate.sequence - this is handled in the
DocumentTemplate package itself.

3.5.2 (2010-04-30)
------------------
Expand Down
8 changes: 2 additions & 6 deletions src/RestrictedPython/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@
except ImportError:
pass

try:
import DocumentTemplate.sequence
utility_builtins['sequence']= DocumentTemplate.sequence
except ImportError:
pass


def same_type(arg1, *args):
'''Compares the class or type of two or more objects.'''
Expand All @@ -58,6 +52,7 @@ def same_type(arg1, *args):
return 1
utility_builtins['same_type'] = same_type


def test(*args):
length = len(args)
for i in range(1, length, 2):
Expand All @@ -68,6 +63,7 @@ def test(*args):
return args[-1]
utility_builtins['test'] = test


def reorder(s, with_=None, without=()):
# s, with_, and without are sequences treated as sets.
# The result is subtract(intersect(s, with_), without),
Expand Down
9 changes: 0 additions & 9 deletions src/RestrictedPython/tests/testUtiliities.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ def test_DateTime_in_utility_builtins_if_importable(self):
from RestrictedPython.Utilities import utility_builtins
self.failUnless('DateTime' in utility_builtins)

def test_sequence_in_utility_builtins_if_importable(self):
try:
import DocumentTemplate.sequence
except ImportError:
pass
else:
from RestrictedPython.Utilities import utility_builtins
self.failUnless('sequence' in utility_builtins)

def test_same_type_in_utility_builtins(self):
from RestrictedPython.Utilities import same_type
from RestrictedPython.Utilities import utility_builtins
Expand Down

0 comments on commit d13615f

Please sign in to comment.