[Zope-Checkins] SVN: Zope/trunk/ Repair changelog mishap.

2008-10-27 Thread Stefan H. Holek
Log message for revision 92643:
  Repair changelog mishap.
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2008-10-27 23:19:49 UTC (rev 92642)
+++ Zope/trunk/doc/CHANGES.txt  2008-10-27 23:39:00 UTC (rev 92643)
@@ -222,6 +222,8 @@
   - Ensure that response header values cannot embed CRLF pairs, which
 violate the HTTP spec (RFC 2616).
 
+  - Testing.ZopeTestCase: installPackage was tied to the ZopeLite layer.
+
   - Launchpad #280334: Fixed problem with 'timeout'
 argument/attribute missing in testbrowser tests.
 

Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2008-10-27 
23:19:49 UTC (rev 92642)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2008-10-27 
23:39:00 UTC (rev 92643)
@@ -1,3 +1,5 @@
+[Later changes are logged in Zope's CHANGES.txt]
+
 0.9.10 (Zope 2.11 edition)
 - Switched to Zope3 interfaces.
 - Removed broken profiler support.

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/ Reverted r89900 (version bump).

2008-10-27 Thread Stefan H. Holek
Log message for revision 92642:
  Reverted r89900 (version bump).
  

Changed:
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/doc/VERSION.txt

-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2008-10-27 
23:18:32 UTC (rev 92641)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  2008-10-27 
23:19:49 UTC (rev 92642)
@@ -1,6 +1,3 @@
-0.9.11 (Zope 2.12 edition)
-- Bugfix: installPackage was tied to the ZopeLite layer.
-
 0.9.10 (Zope 2.11 edition)
 - Switched to Zope3 interfaces.
 - Removed broken profiler support.

Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/doc/VERSION.txt
===
--- Zope/trunk/lib/python/Testing/ZopeTestCase/doc/VERSION.txt  2008-10-27 
23:18:32 UTC (rev 92641)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/doc/VERSION.txt  2008-10-27 
23:19:49 UTC (rev 92642)
@@ -1 +1 @@
-ZopeTestCase 0.9.11
+ZopeTestCase 0.9.10

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


[Zope-Checkins] SVN: Zope/branches/2.11/ Repair changelog faux pas.

2008-10-27 Thread Stefan H. Holek
Log message for revision 92641:
  Repair changelog faux pas.
  

Changed:
  U   Zope/branches/2.11/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===
--- Zope/branches/2.11/doc/CHANGES.txt  2008-10-27 23:12:13 UTC (rev 92640)
+++ Zope/branches/2.11/doc/CHANGES.txt  2008-10-27 23:18:32 UTC (rev 92641)
@@ -44,6 +44,7 @@
   - Launchpad #262313: respect the 'Expand macros when editing' flag
 when editing a page template through the ZMI
 
+  - Testing.ZopeTestCase: installPackage was tied to the ZopeLite layer.
 
   Zope 2.11.1 (2008/07/17)
 

Modified: Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===
--- Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  
2008-10-27 23:12:13 UTC (rev 92640)
+++ Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  
2008-10-27 23:18:32 UTC (rev 92641)
@@ -1,3 +1,5 @@
+[Later changes are logged in Zope's CHANGES.txt]
+
 0.9.10 (Zope 2.11 edition)
 - Switched to Zope3 interfaces.
 - Removed broken profiler support.

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


[Zope-Checkins] SVN: Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/ Reverted r89899 (version bump).

2008-10-27 Thread Stefan H. Holek
Log message for revision 92640:
  Reverted r89899 (version bump).
  

Changed:
  U   Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
  U   Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/VERSION.txt

-=-
Modified: Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt
===
--- Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  
2008-10-27 22:34:04 UTC (rev 92639)
+++ Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/CHANGES.txt  
2008-10-27 23:12:13 UTC (rev 92640)
@@ -1,6 +1,3 @@
-0.9.11 (Zope 2.11 edition)
-- Bugfix: installPackage was tied to the ZopeLite layer.
-
 0.9.10 (Zope 2.11 edition)
 - Switched to Zope3 interfaces.
 - Removed broken profiler support.

Modified: Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/VERSION.txt
===
--- Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/VERSION.txt  
2008-10-27 22:34:04 UTC (rev 92639)
+++ Zope/branches/2.11/lib/python/Testing/ZopeTestCase/doc/VERSION.txt  
2008-10-27 23:12:13 UTC (rev 92640)
@@ -1 +1 @@
-ZopeTestCase 0.9.11
+ZopeTestCase 0.9.10

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


[Zope-Checkins] SVN: Zope/trunk/doc/CHANGES.txt Note change

2008-10-27 Thread Tres Seaver
Log message for revision 92633:
  Note change

Changed:
  U   Zope/trunk/doc/CHANGES.txt

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2008-10-27 20:34:06 UTC (rev 92632)
+++ Zope/trunk/doc/CHANGES.txt  2008-10-27 20:55:59 UTC (rev 92633)
@@ -219,6 +219,8 @@
 
 Bugs Fixed
 
+  - Ensure that response header values cannot embed CRLF pairs, which
+violate the HTTP spec (RFC 2616).
 
   - Launchpad #280334: Fixed problem with 'timeout'
 argument/attribute missing in testbrowser tests.

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py Make test actually exercise guards in Python 2.5.

2008-10-27 Thread Tres Seaver
Log message for revision 92632:
  Make test actually exercise guards in Python 2.5.

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

-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
20:30:03 UTC (rev 92631)
+++ Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
20:34:06 UTC (rev 92632)
@@ -307,8 +307,11 @@
 self.assertRaises(Unauthorized, guarded_min, [1,2,3])
 self.assertRaises(Unauthorized, guarded_min, 1,2,3)
 if MIN_MAX_TAKE_KEY:
+class MyDict(dict):  # guard() skips 'dict' values
+pass
 self.assertRaises(Unauthorized, guarded_min,
-  [{'x':1},{'x':2}], operator.itemgetter('x'))
+  MyDict(x=1), MyDict(x=2),
+  key=operator.itemgetter('x'))
 self.setSecurityManager(old)
 
 def test_max_fails(self):
@@ -319,8 +322,11 @@
 self.assertRaises(Unauthorized, guarded_max, [1,2,3])
 self.assertRaises(Unauthorized, guarded_max, 1,2,3)
 if MIN_MAX_TAKE_KEY:
+class MyDict(dict):  # guard() skips 'dict' values
+pass
 self.assertRaises(Unauthorized, guarded_max, 
-[{'x':1},{'x':2}], operator.itemgetter('x'))
+  MyDict(x=1), MyDict(x=2),
+  key=operator.itemgetter('x'))
 self.setSecurityManager(old)
 
 def test_enumerate_fails(self):
@@ -377,7 +383,9 @@
 self.assertEqual(guarded_min([1,2,3]), 1)
 self.assertEqual(guarded_min(1,2,3), 1)
 if MIN_MAX_TAKE_KEY:
-self.assertEqual(guarded_min({'x':1},{'x':2}, 
+class MyDict(dict):  # guard() skips 'dict' values
+pass
+self.assertEqual(guarded_min(MyDict(x=1), MyDict(x=2),
  key=operator.itemgetter('x')),
  {'x':1})
 self.setSecurityManager(old)
@@ -389,7 +397,9 @@
 self.assertEqual(guarded_max([1,2,3]), 3)
 self.assertEqual(guarded_max(1,2,3), 3)
 if MIN_MAX_TAKE_KEY:
-self.assertEqual(guarded_max({'x':1},{'x':2}, 
+class MyDict(dict):  # guard() skips 'dict' values
+pass
+self.assertEqual(guarded_max(MyDict(x=1), MyDict(x=2),
  key=operator.itemgetter('x')),
  {'x':2})
 self.setSecurityManager(old)

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py Pass key as positional, rather than keyword, to get passing on 2.5.

2008-10-27 Thread Tres Seaver
Log message for revision 92629:
  Pass key as positional, rather than keyword, to get passing on 2.5.

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

-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
20:01:18 UTC (rev 92628)
+++ Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
20:14:36 UTC (rev 92629)
@@ -308,7 +308,7 @@
 self.assertRaises(Unauthorized, guarded_min, 1,2,3)
 if MIN_MAX_TAKE_KEY:
 self.assertRaises(Unauthorized, guarded_min,
-  [{'x':1},{'x':2}], key=operator.itemgetter('x'))
+  [{'x':1},{'x':2}], operator.itemgetter('x'))
 self.setSecurityManager(old)
 
 def test_max_fails(self):
@@ -320,7 +320,7 @@
 self.assertRaises(Unauthorized, guarded_max, 1,2,3)
 if MIN_MAX_TAKE_KEY:
 self.assertRaises(Unauthorized, guarded_max, 
-[{'x':1},{'x':2}], key=operator.itemgetter('x'))
+[{'x':1},{'x':2}], operator.itemgetter('x'))
 self.setSecurityManager(old)
 
 def test_enumerate_fails(self):

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/actual_python.py Typo.

2008-10-27 Thread Tres Seaver
Log message for revision 92628:
  Typo.

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

-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/actual_python.py
===
--- Zope/trunk/lib/python/AccessControl/tests/actual_python.py  2008-10-27 
19:20:54 UTC (rev 92627)
+++ Zope/trunk/lib/python/AccessControl/tests/actual_python.py  2008-10-27 
20:01:18 UTC (rev 92628)
@@ -175,7 +175,7 @@
 
 def f13():
 try:
-all
+any
 except NameError:
 pass # Python < 2.5
 else:

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/ZPublisher/ Actually land the CRLF response header fix.

2008-10-27 Thread Tres Seaver
Log message for revision 92625:
  Actually land the CRLF response header fix.

Changed:
  U   Zope/trunk/lib/python/ZPublisher/HTTPResponse.py
  U   Zope/trunk/lib/python/ZPublisher/tests/testHTTPResponse.py

-=-
Modified: Zope/trunk/lib/python/ZPublisher/HTTPResponse.py
===
--- Zope/trunk/lib/python/ZPublisher/HTTPResponse.py2008-10-27 19:18:53 UTC 
(rev 92624)
+++ Zope/trunk/lib/python/ZPublisher/HTTPResponse.py2008-10-27 19:19:42 UTC 
(rev 92625)
@@ -122,7 +122,11 @@
 if otherTypes:
 uncompressableMimeMajorTypes += tuple(otherTypes.split(','))
 
+_CRLF = re.compile(r'\r[\n]?')
 
+def _scrubHeader(name, value):
+return ''.join(_CRLF.split(str(name))), ''.join(_CRLF.split(str(value)))
+
 class HTTPResponse(BaseResponse):
 """\
 An object representation of an HTTP response.
@@ -242,15 +246,14 @@
 if lock:
  self._locked_status = 1
 
-def setHeader(self, name, value, literal=0):
+def setHeader(self, name, value, literal=0, scrubbed=False):
 '''\
 Sets an HTTP return header "name" with value "value", clearing
 the previous value set for the header, if one exists. If the
 literal flag is true, the case of the header name is preserved,
 otherwise the header name will be lowercased.'''
-
-name = str(name)
-value = str(value)
+if not scrubbed:
+name, value = _scrubHeader(name, value)
 key = name.lower()
 if accumulate_header(key):
 self.accumulated_headers = (
@@ -275,8 +278,7 @@
 '''\
 Set a new HTTP return header with the given value, while retaining
 any previously set headers with the same name.'''
-name = str(name)
-value = str(value)
+name, value = _scrubHeader(name, value)
 self.accumulated_headers = (
 "%s%s: %s\r\n" % (self.accumulated_headers, name, value))
 
@@ -585,8 +587,8 @@
 Sets an HTTP return header "name" with value "value",
 appending it following a comma if there was a previous value
 set for the header. '''
-name = str(name).lower()
-value = str(value)
+name, value = _scrubHeader(name, value)
+name = name.lower()
 
 headers = self.headers
 if headers.has_key(name):
@@ -594,7 +596,7 @@
 h = "%s%s\r\n\t%s" % (h,delimiter,value)
 else:
 h = value
-self.setHeader(name,h)
+self.setHeader(name,h, scrubbed=True)
 
 def isHTML(self, s):
 s = s.lstrip()

Modified: Zope/trunk/lib/python/ZPublisher/tests/testHTTPResponse.py
===
--- Zope/trunk/lib/python/ZPublisher/tests/testHTTPResponse.py  2008-10-27 
19:18:53 UTC (rev 92624)
+++ Zope/trunk/lib/python/ZPublisher/tests/testHTTPResponse.py  2008-10-27 
19:19:42 UTC (rev 92625)
@@ -145,7 +145,42 @@
 response = self._makeOne(body=xml, headers={'content-type': 'text/xml; 
charset=iso-8859-15'})
 self.assertEqual(xml==response.body, True)
 
+def test_addHeader_drops_CRLF(self):
+# RFC2616 disallows CRLF in a header value.
+response = self._makeOne()
+response.addHeader('Location',
+   'http://www.ietf.org/rfc/\r\nrfc2616.txt')
+self.assertEqual(response.accumulated_headers,
+ 'Location: http://www.ietf.org/rfc/rfc2616.txt\r\n')
 
+def test_appendHeader_drops_CRLF(self):
+# RFC2616 disallows CRLF in a header value.
+response = self._makeOne()
+response.appendHeader('Location',
+   'http://www.ietf.org/rfc/\r\nrfc2616.txt')
+self.assertEqual(response.headers['location'],
+ 'http://www.ietf.org/rfc/rfc2616.txt')
+
+def test_setHeader_drops_CRLF(self):
+# RFC2616 disallows CRLF in a header value.
+response = self._makeOne()
+response.setHeader('Location',
+   'http://www.ietf.org/rfc/\r\nrfc2616.txt')
+self.assertEqual(response.headers['location'],
+ 'http://www.ietf.org/rfc/rfc2616.txt')
+
+def test_setHeader_drops_CRLF_when_accumulating(self):
+# RFC2616 disallows CRLF in a header value.
+response = self._makeOne()
+response.setHeader('Set-Cookie', 'allowed="OK"')
+response.setHeader('Set-Cookie',
+   'violation="http://www.ietf.org/rfc/\r\nrfc2616.txt";')
+self.assertEqual(response.accumulated_headers,
+'Set-Cookie: allowed="OK"\r\n' +
+'Set-Cookie: '
+'violation="http://www.ietf.org/rfc/rfc2616.txt"\r\n')
+
+
 def test_suite():
 suite = unittest.TestSuite()
 suite.addTest(unittest.makeSuite(HTTPResponseTests, 'test'))

___
Zope-Checkins maillist  -  Zope-

[Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py Import cleanup

2008-10-27 Thread Tres Seaver
Log message for revision 92624:
  Import cleanup

Changed:
  U   Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py

-=-
Modified: Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py
===
--- Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py  2008-10-27 18:13:22 UTC 
(rev 92623)
+++ Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py  2008-10-27 19:18:53 UTC 
(rev 92624)
@@ -27,7 +27,9 @@
 __version__='$Revision: 1.13 $'[11:-2]
 
 from zExceptions import upgradeException
-from DocumentTemplate.DT_Util import parse_params, name_param, render_blocks, 
str
+from DocumentTemplate.DT_Util import name_param
+from DocumentTemplate.DT_Util import parse_params
+from DocumentTemplate.DT_Util import render_blocks
 
 class InvalidErrorTypeExpression(Exception):
 pass

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


[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py Clean up imports; skip testing 'key' argument to min/max in Python < 2.5.

2008-10-27 Thread Tres Seaver
Log message for revision 92622:
  Clean up imports;  skip testing 'key' argument to min/max in Python < 2.5.

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

-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
===
--- Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
17:57:32 UTC (rev 92621)
+++ Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2008-10-27 
17:58:19 UTC (rev 92622)
@@ -17,22 +17,21 @@
 
 $Id$
 """
+import unittest
 
-import os, sys
+import os
 import operator
-import unittest
+import sys
+
 from zope.testing import doctest
 import ZODB
-import AccessControl.SecurityManagement
-from AccessControl.SimpleObjectPolicies import ContainerAssertions
-from AccessControl import Unauthorized
-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_map, guarded_zip
 
+
 if sys.version_info >= (2, 5):
 from AccessControl.ZopeGuards import guarded_any, guarded_all
+MIN_MAX_TAKE_KEY = True
+else:
+MIN_MAX_TAKE_KEY = False
 
 try:
 __file__
@@ -48,12 +47,14 @@
 self.reject = reject
 
 def validate(self, *args):
+from AccessControl import Unauthorized
 self.calls.append(('validate', args))
 if self.reject:
 raise Unauthorized
 return 1
 
 def validateValue(self, *args):
+from AccessControl import Unauthorized
 self.calls.append(('validateValue', args))
 if self.reject:
 raise Unauthorized
@@ -66,13 +67,14 @@
 class GuardTestCase(unittest.TestCase):
 
 def setSecurityManager(self, manager):
-key = AccessControl.SecurityManagement.get_ident()
-old = AccessControl.SecurityManagement._managers.get(key)
+from AccessControl.SecurityManagement import get_ident
+from AccessControl.SecurityManagement import _managers
+key = get_ident()
+old = _managers.get(key)
 if manager is None:
-del AccessControl.SecurityManagement._managers[key]
+del _managers[key]
 else:
-AccessControl.SecurityManagement._managers[key] = manager
-
+_managers[key] = manager
 return old
 
 
@@ -92,6 +94,8 @@
 self.setSecurityManager(self.__old)
 
 def test_unauthorized(self):
+from AccessControl import Unauthorized
+from AccessControl.ZopeGuards import guarded_getattr
 obj, name = Method(), 'args'
 value = getattr(obj, name)
 rc = sys.getrefcount(value)
@@ -102,10 +106,14 @@
 self.assertEqual(rc, sys.getrefcount(value))
 
 def test_calls_validate_for_unknown_type(self):
+from AccessControl.ZopeGuards import guarded_getattr
 guarded_getattr(self, 'test_calls_validate_for_unknown_type')
 self.assert_(self.__sm.calls)
 
 def test_attr_handler_table(self):
+from AccessControl import Unauthorized
+from AccessControl.ZopeGuards import guarded_getattr
+from AccessControl.SimpleObjectPolicies import ContainerAssertions
 d = {}
 _dict = type(d)
 old = ContainerAssertions.get(_dict)
@@ -128,15 +136,18 @@
 class TestDictGuards(GuardTestCase):
 
 def test_get_simple(self):
+from AccessControl.ZopeGuards import get_dict_get
 get = get_dict_get({'foo': 'bar'}, 'get')
 self.assertEqual(get('foo'), 'bar')
 
 def test_get_default(self):
+from AccessControl.ZopeGuards import get_dict_get
 get = get_dict_get({'foo': 'bar'}, 'get')
 self.failUnless(get('baz') is None)
 self.assertEqual(get('baz', 'splat'), 'splat')
 
 def test_get_validates(self):
+from AccessControl.ZopeGuards import get_dict_get
 sm = SecurityManager()
 old = self.setSecurityManager(sm)
 get = get_dict_get({'foo':GuardTestCase}, 'get')
@@ -147,18 +158,22 @@
 self.assert_(sm.calls)
 
 def test_pop_simple(self):
+from AccessControl.ZopeGuards import get_dict_pop
 pop = get_dict_pop({'foo': 'bar'}, 'pop')
 self.assertEqual(pop('foo'), 'bar')
 
 def test_pop_raises(self):
+from AccessControl.ZopeGuards import get_dict_pop
 pop = get_dict_pop({'foo': 'bar'}, 'pop')
 self.assertRaises(KeyError, pop, 'baz')
 
 def test_pop_default(self):
+from AccessControl.ZopeGuards import get_dict_pop
 pop = get_dict_pop({'foo': 'bar'}, 'pop')
 self.assertEqual(pop('baz', 'splat'), 'splat')
 
 def test_pop_validates(self):
+from AccessControl.ZopeGuards import get_dict_get
 sm = SecurityManager()
 old = self.setSecurityManager(sm)
 pop = get_dict_get({'foo':GuardTestCase}, 'pop')
@@ -171,6 +186,7 @@
 if sys.versi

[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/actual_python.py 'any' and 'all' are not builtins in Python 2.4.

2008-10-27 Thread Tres Seaver
Log message for revision 92621:
  'any' and 'all' are not builtins in Python 2.4.

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

-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/actual_python.py
===
--- Zope/trunk/lib/python/AccessControl/tests/actual_python.py  2008-10-27 
17:55:50 UTC (rev 92620)
+++ Zope/trunk/lib/python/AccessControl/tests/actual_python.py  2008-10-27 
17:57:32 UTC (rev 92621)
@@ -164,13 +164,23 @@
 f11()
 
 def f12():
-assert all([True, True, True]) == True
-assert all([True, False, True]) == False
+try:
+all
+except NameError:
+pass # Python < 2.5
+else:
+assert all([True, True, True]) == True
+assert all([True, False, True]) == False
 f12()
 
 def f13():
-assert any([True, True, True]) == True
-assert any([True, False, True]) == True
-assert any([False, False, False]) == False
+try:
+all
+except NameError:
+pass # Python < 2.5
+else:
+assert any([True, True, True]) == True
+assert any([True, False, True]) == True
+assert any([False, False, False]) == False
 f13()
 

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


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt update

2008-10-27 Thread Andreas Jung
Log message for revision 92615:
  update

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2008-10-27 15:13:04 UTC 
(rev 92614)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2008-10-27 15:13:42 UTC 
(rev 92615)
@@ -4,6 +4,10 @@
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
 
+  Zope 2.8.11 (unreleased)
+
+Bugs fixed
+
   Zope 2.8.10 (2008/10/24)
 
 Bugs fixed

___
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 update

2008-10-27 Thread Andreas Jung
Log message for revision 92614:
  update

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-27 15:12:07 UTC (rev 92613)
+++ Zope/branches/2.9/doc/CHANGES.txt   2008-10-27 15:13:04 UTC (rev 92614)
@@ -4,6 +4,10 @@
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
 
+  Zope 2.9.11 (unreleased)
+
+   Bugs fixed
+
   Zope 2.9.10 (2008/10/24)
 
Bugs fixed

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


[Zope-Checkins] SVN: Zope/branches/2.10/doc/CHANGES.txt update

2008-10-27 Thread Andreas Jung
Log message for revision 92613:
  update

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

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===
--- Zope/branches/2.10/doc/CHANGES.txt  2008-10-27 15:11:27 UTC (rev 92612)
+++ Zope/branches/2.10/doc/CHANGES.txt  2008-10-27 15:12:07 UTC (rev 92613)
@@ -4,6 +4,10 @@
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
 
+  Zope 2.10.8 (unreleased)
+
+Bugs fixed
+
   Zope 2.10.7 (2008/10/24)
 
 Bugs fixed

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


[Zope-Checkins] SVN: Zope/branches/2.11/doc/CHANGES.txt update

2008-10-27 Thread Andreas Jung
Log message for revision 92612:
  update

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

-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===
--- Zope/branches/2.11/doc/CHANGES.txt  2008-10-27 11:18:12 UTC (rev 92611)
+++ Zope/branches/2.11/doc/CHANGES.txt  2008-10-27 15:11:27 UTC (rev 92612)
@@ -3,6 +3,10 @@
   This file contains change information for the current Zope release.
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
+
+  Zope 2.11.3 (unreleased)
+
+Bugs Fixed
   
   Zope 2.11.2 (2008/10/24) 
 

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