[Zope-Checkins] SVN: Zope/branches/2.10/setup.py Fix script locations for ZODB 3.7.3.

2008-10-21 Thread Stefan H. Holek
Log message for revision 92411:
  Fix script locations for ZODB 3.7.3.

Changed:
  U   Zope/branches/2.10/setup.py

-=-
Modified: Zope/branches/2.10/setup.py
===
--- Zope/branches/2.10/setup.py 2008-10-20 20:39:38 UTC (rev 92410)
+++ Zope/branches/2.10/setup.py 2008-10-21 08:08:12 UTC (rev 92411)
@@ -504,21 +504,34 @@
 author=AUTHOR,
 
 data_files=installed_data_files,
-scripts=[utilities/mkzeoinstance.py, utilities/mkzopeinstance.py,
- utilities/check_catalog.py, utilities/load_site.py,
- utilities/requestprofiler.py, utilities/zpasswd.py,
- utilities/copyzopeskel.py, utilities/reindex_catalog.py,
- utilities/compilezpy.py, utilities/decompilezpy.py,
- utilities/ZODBTools/timeout.py, 
utilities/ZODBTools/analyze.py,
- utilities/ZODBTools/checkbtrees.py, 
utilities/ZODBTools/fsdump.py,
- utilities/ZODBTools/fsrefs.py , utilities/ZODBTools/fstail.py,
- utilities/ZODBTools/fstest.py, utilities/ZODBTools/migrate.py,
- utilities/ZODBTools/netspace.py, 
utilities/ZODBTools/parsezeolog.py,
- utilities/ZODBTools/repozo.py, utilities/ZODBTools/space.py,
- utilities/ZODBTools/timeout.py, 
utilities/ZODBTools/zeopack.py,
- utilities/ZODBTools/zeoqueue.py, 
utilities/ZODBTools/zeoreplay.py,
- utilities/ZODBTools/zeoserverlog.py, 
utilities/ZODBTools/zeoup.py,
+scripts=[utilities/mkzeoinstance.py,
+ utilities/mkzopeinstance.py,
+ utilities/check_catalog.py,
+ utilities/load_site.py,
+ utilities/requestprofiler.py,
+ utilities/zpasswd.py,
+ utilities/copyzopeskel.py,
+ utilities/reindex_catalog.py,
+ utilities/compilezpy.py,
+ utilities/decompilezpy.py,
+ utilities/ZODBTools/analyze.py,
+ utilities/ZODBTools/checkbtrees.py,
+ utilities/ZODBTools/fsdump.py,
+ utilities/ZODBTools/fsrefs.py ,
+ utilities/ZODBTools/fstail.py,
+ utilities/ZODBTools/fstest.py,
+ utilities/ZODBTools/migrate.py,
+ utilities/ZODBTools/netspace.py,
  utilities/ZODBTools/zodbload.py,
+ utilities/ZODBTools/repozo.py,
+ utilities/ZODBTools/space.py,
+ lib/python/ZEO/scripts/timeout.py,
+ lib/python/ZEO/scripts/parsezeolog.py,
+ lib/python/ZEO/scripts/zeopack.py,
+ lib/python/ZEO/scripts/zeoqueue.py,
+ lib/python/ZEO/scripts/zeoreplay.py,
+ lib/python/ZEO/scripts/zeoserverlog.py,
+ lib/python/ZEO/scripts/zeoup.py,
  test.py],
 distclass=ZopeDistribution,
 )

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/ - Launchpad #282677: fixed implementation of guarded_map and

2008-10-21 Thread Sidnei da Silva
Log message for revision 92436:
  - Launchpad #282677: fixed implementation of guarded_map and
provided tests and implementation for guarded_zip (RestrictedPython).
  
  

Changed:
  U   Zope/trunk/lib/python/AccessControl/ZopeGuards.py
  U   Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py

-=-
Modified: Zope/trunk/lib/python/AccessControl/ZopeGuards.py
===
--- Zope/trunk/lib/python/AccessControl/ZopeGuards.py   2008-10-21 17:07:58 UTC 
(rev 92435)
+++ Zope/trunk/lib/python/AccessControl/ZopeGuards.py   2008-10-21 17:30:18 UTC 
(rev 92436)
@@ -255,10 +255,18 @@
 safe_seqs = []
 for seqno in range(len(seqs)):
 seq = guarded_getitem(seqs, seqno)
-safe_seqs.append(seq)
+safe_seqs.append(guarded_iter(seq))
 return map(f, *safe_seqs)
 safe_builtins['map'] = guarded_map
 
+def guarded_zip(*seqs):
+safe_seqs = []
+for seqno in range(len(seqs)):
+seq = guarded_getitem(seqs, seqno)
+safe_seqs.append(guarded_iter(seq))
+return zip(*safe_seqs)
+safe_builtins['zip'] = guarded_zip
+
 def guarded_import(mname, globals=None, locals=None, fromlist=None):
 if fromlist is None:
 fromlist = ()

Modified: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-21 
17:07:58 UTC (rev 92435)
+++ Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-21 
17:30:18 UTC (rev 92436)
@@ -19,6 +19,7 @@
 
 
 import os, sys
+import operator
 import unittest
 from zope.testing import doctest
 import ZODB
@@ -28,7 +29,7 @@
 from AccessControl.ZopeGuards \
 import guarded_getattr, get_dict_get, get_dict_pop, get_list_pop, \
 get_iter, guarded_min, guarded_max, safe_builtins, guarded_enumerate, \
-guarded_sum, guarded_apply
+guarded_sum, guarded_apply, guarded_map, guarded_zip
 
 try:
 __file__
@@ -236,6 +237,22 @@
 
 class TestBuiltinFunctionGuards(GuardTestCase):
 
+def test_zip_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [3,2,1])
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [1])
+self.setSecurityManager(old)
+
+def test_map_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_map, str, 
+  [1,2,3])
+self.assertRaises(Unauthorized, guarded_map, lambda x,y: x+y, 
+  [1,2,3], [3,2,1])
+self.setSecurityManager(old)
+
 def test_min_fails(self):
 sm = SecurityManager(1) # rejects
 old = self.setSecurityManager(sm)
@@ -263,6 +280,21 @@
 self.assertRaises(Unauthorized, guarded_sum, [1,2,3])
 self.setSecurityManager(old)
 
+def test_zip_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
+self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
+self.setSecurityManager(old)
+
+def test_map_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_map(str, [1,2,3]), ['1','2','3'])
+self.assertEqual(guarded_map(lambda x,y: x+y, [1,2,3], [3,2,1]), 
+ [4,4,4])
+self.setSecurityManager(old)
+
 def test_min_succeeds(self):
 sm = SecurityManager() # accepts
 old = self.setSecurityManager(sm)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/AccessControl/ - Launchpad #282677: fixed implementation of guarded_map and

2008-10-21 Thread Sidnei da Silva
Log message for revision 92437:
  - Launchpad #282677: fixed implementation of guarded_map and
provided tests and implementation for guarded_zip (RestrictedPython).
  
  

Changed:
  U   Zope/branches/2.9/lib/python/AccessControl/ZopeGuards.py
  U   Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py

-=-
Modified: Zope/branches/2.9/lib/python/AccessControl/ZopeGuards.py
===
--- Zope/branches/2.9/lib/python/AccessControl/ZopeGuards.py2008-10-21 
17:30:18 UTC (rev 92436)
+++ Zope/branches/2.9/lib/python/AccessControl/ZopeGuards.py2008-10-21 
17:35:43 UTC (rev 92437)
@@ -255,10 +255,18 @@
 safe_seqs = []
 for seqno in range(len(seqs)):
 seq = guarded_getitem(seqs, seqno)
-safe_seqs.append(seq)
+safe_seqs.append(guarded_iter(seq))
 return map(f, *safe_seqs)
 safe_builtins['map'] = guarded_map
 
+def guarded_zip(*seqs):
+safe_seqs = []
+for seqno in range(len(seqs)):
+seq = guarded_getitem(seqs, seqno)
+safe_seqs.append(guarded_iter(seq))
+return zip(*safe_seqs)
+safe_builtins['zip'] = guarded_zip
+
 def guarded_import(mname, globals=None, locals=None, fromlist=None):
 if fromlist is None:
 fromlist = ()

Modified: Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py  
2008-10-21 17:30:18 UTC (rev 92436)
+++ Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py  
2008-10-21 17:35:43 UTC (rev 92437)
@@ -19,6 +19,7 @@
 
 
 import os, sys
+import operator
 import unittest
 from zope.testing import doctest
 import ZODB
@@ -28,7 +29,7 @@
 from AccessControl.ZopeGuards \
 import guarded_getattr, get_dict_get, get_dict_pop, get_list_pop, \
 get_iter, guarded_min, guarded_max, safe_builtins, guarded_enumerate, \
-guarded_sum, guarded_apply
+guarded_sum, guarded_apply, guarded_map, guarded_zip
 
 try:
 __file__
@@ -236,6 +237,22 @@
 
 class TestBuiltinFunctionGuards(GuardTestCase):
 
+def test_zip_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [3,2,1])
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [1])
+self.setSecurityManager(old)
+
+def test_map_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_map, str, 
+  [1,2,3])
+self.assertRaises(Unauthorized, guarded_map, lambda x,y: x+y, 
+  [1,2,3], [3,2,1])
+self.setSecurityManager(old)
+
 def test_min_fails(self):
 sm = SecurityManager(1) # rejects
 old = self.setSecurityManager(sm)
@@ -263,6 +280,21 @@
 self.assertRaises(Unauthorized, guarded_sum, [1,2,3])
 self.setSecurityManager(old)
 
+def test_zip_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
+self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
+self.setSecurityManager(old)
+
+def test_map_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_map(str, [1,2,3]), ['1','2','3'])
+self.assertEqual(guarded_map(lambda x,y: x+y, [1,2,3], [3,2,1]), 
+ [4,4,4])
+self.setSecurityManager(old)
+
 def test_min_succeeds(self):
 sm = SecurityManager() # accepts
 old = self.setSecurityManager(sm)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.9/doc/CHANGES.txt - Record last checkin

2008-10-21 Thread Sidnei da Silva
Log message for revision 92438:
   - Record last checkin

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2008-10-21 17:35:43 UTC (rev 92437)
+++ Zope/branches/2.9/doc/CHANGES.txt   2008-10-21 17:37:30 UTC (rev 92438)
@@ -8,6 +8,10 @@
 
Bugs fixed
 
+  - Launchpad #282677: fixed implementation of guarded_map and
+provided tests and implementation for guarded_zip
+(RestrictedPython).
+
   - 'AccessControl.ZopeGuards.guarded_import' mapped some Unauthorized
 exceptions onto ImportErrors:  don't do that!  Also, removed
 mutable defaults from argument list, improved tests.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.11/ - Launchpad #282677: fixed implementation of guarded_map and provided

2008-10-21 Thread Sidnei da Silva
Log message for revision 92440:
  - Launchpad #282677: fixed implementation of guarded_map and provided
tests and implementation for guarded_zip (RestrictedPython).
  
  

Changed:
  U   Zope/branches/2.11/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/AccessControl/ZopeGuards.py
  U   Zope/branches/2.11/lib/python/AccessControl/tests/testZopeGuards.py

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===
--- Zope/branches/2.11/doc/CHANGES.txt  2008-10-21 17:38:54 UTC (rev 92439)
+++ Zope/branches/2.11/doc/CHANGES.txt  2008-10-21 17:40:10 UTC (rev 92440)
@@ -8,6 +8,9 @@
 
 Bugs Fixed
 
+  - Launchpad #282677: fixed implementation of guarded_map and
+provided tests and implementation for guarded_zip (RestrictedPython).
+
   - updated to ZODB 3.8.1
 
   - Lauchpad #143736,#271395: fixed AttributeError' on _ltid in TempStorage

Modified: Zope/branches/2.11/lib/python/AccessControl/ZopeGuards.py
===
--- Zope/branches/2.11/lib/python/AccessControl/ZopeGuards.py   2008-10-21 
17:38:54 UTC (rev 92439)
+++ Zope/branches/2.11/lib/python/AccessControl/ZopeGuards.py   2008-10-21 
17:40:10 UTC (rev 92440)
@@ -255,10 +255,18 @@
 safe_seqs = []
 for seqno in range(len(seqs)):
 seq = guarded_getitem(seqs, seqno)
-safe_seqs.append(seq)
+safe_seqs.append(guarded_iter(seq))
 return map(f, *safe_seqs)
 safe_builtins['map'] = guarded_map
 
+def guarded_zip(*seqs):
+safe_seqs = []
+for seqno in range(len(seqs)):
+seq = guarded_getitem(seqs, seqno)
+safe_seqs.append(guarded_iter(seq))
+return zip(*safe_seqs)
+safe_builtins['zip'] = guarded_zip
+
 def guarded_import(mname, globals=None, locals=None, fromlist=None):
 if fromlist is None:
 fromlist = ()

Modified: Zope/branches/2.11/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/branches/2.11/lib/python/AccessControl/tests/testZopeGuards.py 
2008-10-21 17:38:54 UTC (rev 92439)
+++ Zope/branches/2.11/lib/python/AccessControl/tests/testZopeGuards.py 
2008-10-21 17:40:10 UTC (rev 92440)
@@ -19,6 +19,7 @@
 
 
 import os, sys
+import operator
 import unittest
 from zope.testing import doctest
 import ZODB
@@ -28,7 +29,7 @@
 from AccessControl.ZopeGuards \
 import guarded_getattr, get_dict_get, get_dict_pop, get_list_pop, \
 get_iter, guarded_min, guarded_max, safe_builtins, guarded_enumerate, \
-guarded_sum, guarded_apply
+guarded_sum, guarded_apply, guarded_map, guarded_zip
 
 try:
 __file__
@@ -236,6 +237,22 @@
 
 class TestBuiltinFunctionGuards(GuardTestCase):
 
+def test_zip_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [3,2,1])
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [1])
+self.setSecurityManager(old)
+
+def test_map_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_map, str, 
+  [1,2,3])
+self.assertRaises(Unauthorized, guarded_map, lambda x,y: x+y, 
+  [1,2,3], [3,2,1])
+self.setSecurityManager(old)
+
 def test_min_fails(self):
 sm = SecurityManager(1) # rejects
 old = self.setSecurityManager(sm)
@@ -263,6 +280,21 @@
 self.assertRaises(Unauthorized, guarded_sum, [1,2,3])
 self.setSecurityManager(old)
 
+def test_zip_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
+self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
+self.setSecurityManager(old)
+
+def test_map_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_map(str, [1,2,3]), ['1','2','3'])
+self.assertEqual(guarded_map(lambda x,y: x+y, [1,2,3], [3,2,1]), 
+ [4,4,4])
+self.setSecurityManager(old)
+
 def test_min_succeeds(self):
 sm = SecurityManager() # accepts
 old = self.setSecurityManager(sm)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.10/ - Launchpad #282677: fixed implementation of guarded_map and provided

2008-10-21 Thread Sidnei da Silva
Log message for revision 92439:
  - Launchpad #282677: fixed implementation of guarded_map and provided
tests and implementation for guarded_zip (RestrictedPython).
  
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/AccessControl/ZopeGuards.py
  U   Zope/branches/2.10/lib/python/AccessControl/tests/testZopeGuards.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===
--- Zope/branches/2.10/doc/CHANGES.txt  2008-10-21 17:37:30 UTC (rev 92438)
+++ Zope/branches/2.10/doc/CHANGES.txt  2008-10-21 17:38:54 UTC (rev 92439)
@@ -8,6 +8,10 @@
 
 Bugs fixed
 
+  - Launchpad #282677: fixed implementation of guarded_map and
+provided tests and implementation for guarded_zip
+(RestrictedPython).
+
   - Lauchpad #143736,#271395: fixed AttributeError' on _ltid in TempStorage
 
   - 'AccessControl.ZopeGuards.guarded_import' mapped some Unauthorized

Modified: Zope/branches/2.10/lib/python/AccessControl/ZopeGuards.py
===
--- Zope/branches/2.10/lib/python/AccessControl/ZopeGuards.py   2008-10-21 
17:37:30 UTC (rev 92438)
+++ Zope/branches/2.10/lib/python/AccessControl/ZopeGuards.py   2008-10-21 
17:38:54 UTC (rev 92439)
@@ -255,10 +255,18 @@
 safe_seqs = []
 for seqno in range(len(seqs)):
 seq = guarded_getitem(seqs, seqno)
-safe_seqs.append(seq)
+safe_seqs.append(guarded_iter(seq))
 return map(f, *safe_seqs)
 safe_builtins['map'] = guarded_map
 
+def guarded_zip(*seqs):
+safe_seqs = []
+for seqno in range(len(seqs)):
+seq = guarded_getitem(seqs, seqno)
+safe_seqs.append(guarded_iter(seq))
+return zip(*safe_seqs)
+safe_builtins['zip'] = guarded_zip
+
 def guarded_import(mname, globals=None, locals=None, fromlist=None):
 if fromlist is None:
 fromlist = ()

Modified: Zope/branches/2.10/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/branches/2.10/lib/python/AccessControl/tests/testZopeGuards.py 
2008-10-21 17:37:30 UTC (rev 92438)
+++ Zope/branches/2.10/lib/python/AccessControl/tests/testZopeGuards.py 
2008-10-21 17:38:54 UTC (rev 92439)
@@ -19,6 +19,7 @@
 
 
 import os, sys
+import operator
 import unittest
 from zope.testing import doctest
 import ZODB
@@ -28,7 +29,7 @@
 from AccessControl.ZopeGuards \
 import guarded_getattr, get_dict_get, get_dict_pop, get_list_pop, \
 get_iter, guarded_min, guarded_max, safe_builtins, guarded_enumerate, \
-guarded_sum, guarded_apply
+guarded_sum, guarded_apply, guarded_map, guarded_zip
 
 try:
 __file__
@@ -236,6 +237,22 @@
 
 class TestBuiltinFunctionGuards(GuardTestCase):
 
+def test_zip_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [3,2,1])
+self.assertRaises(Unauthorized, guarded_zip, [1,2,3], [1])
+self.setSecurityManager(old)
+
+def test_map_fails(self):
+sm = SecurityManager(1) # rejects
+old = self.setSecurityManager(sm)
+self.assertRaises(Unauthorized, guarded_map, str, 
+  [1,2,3])
+self.assertRaises(Unauthorized, guarded_map, lambda x,y: x+y, 
+  [1,2,3], [3,2,1])
+self.setSecurityManager(old)
+
 def test_min_fails(self):
 sm = SecurityManager(1) # rejects
 old = self.setSecurityManager(sm)
@@ -263,6 +280,21 @@
 self.assertRaises(Unauthorized, guarded_sum, [1,2,3])
 self.setSecurityManager(old)
 
+def test_zip_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_zip([1,2,3], [3,2,1]), [(1,3),(2,2),(3,1)])
+self.assertEqual(guarded_zip([1,2,3], [1]), [(1,1)])
+self.setSecurityManager(old)
+
+def test_map_succeeds(self):
+sm = SecurityManager() # accepts
+old = self.setSecurityManager(sm)
+self.assertEqual(guarded_map(str, [1,2,3]), ['1','2','3'])
+self.assertEqual(guarded_map(lambda x,y: x+y, [1,2,3], [3,2,1]), 
+ [4,4,4])
+self.setSecurityManager(old)
+
 def test_min_succeeds(self):
 sm = SecurityManager() # accepts
 old = self.setSecurityManager(sm)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins