[Checkins] SVN: RestrictedPython/trunk/ Removed support for DocumentTemplate.sequence - this is handled in the DocumentTemplate package itself.

Hanno Schlichting hannosch at hannosch.eu
Sat Jun 5 12:35:04 EDT 2010


Log message for revision 113154:
  Removed support for DocumentTemplate.sequence - this is handled in the DocumentTemplate package itself.
  

Changed:
  U   RestrictedPython/trunk/CHANGES.txt
  U   RestrictedPython/trunk/src/RestrictedPython/Utilities.py
  U   RestrictedPython/trunk/src/RestrictedPython/tests/testUtiliities.py

-=-
Modified: RestrictedPython/trunk/CHANGES.txt
===================================================================
--- RestrictedPython/trunk/CHANGES.txt	2010-06-05 16:28:20 UTC (rev 113153)
+++ RestrictedPython/trunk/CHANGES.txt	2010-06-05 16:35:03 UTC (rev 113154)
@@ -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)
 ------------------

Modified: RestrictedPython/trunk/src/RestrictedPython/Utilities.py
===================================================================
--- RestrictedPython/trunk/src/RestrictedPython/Utilities.py	2010-06-05 16:28:20 UTC (rev 113153)
+++ RestrictedPython/trunk/src/RestrictedPython/Utilities.py	2010-06-05 16:35:03 UTC (rev 113154)
@@ -42,13 +42,7 @@
 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.'''
     t = getattr(arg1, '__class__', type(arg1))
@@ -58,6 +52,7 @@
     return 1
 utility_builtins['same_type'] = same_type
 
+
 def test(*args):
     length = len(args)
     for i in range(1, length, 2):
@@ -68,6 +63,7 @@
         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),

Modified: RestrictedPython/trunk/src/RestrictedPython/tests/testUtiliities.py
===================================================================
--- RestrictedPython/trunk/src/RestrictedPython/tests/testUtiliities.py	2010-06-05 16:28:20 UTC (rev 113153)
+++ RestrictedPython/trunk/src/RestrictedPython/tests/testUtiliities.py	2010-06-05 16:35:03 UTC (rev 113154)
@@ -60,15 +60,6 @@
             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



More information about the checkins mailing list