[Zope-Checkins] SVN: Zope/trunk/utilities/mkzopeinstance.py Make the SHA usage in mkzopeinstance a conditional import. Re-adds Python2.4 compatibility
Log message for revision 92606: Make the SHA usage in mkzopeinstance a conditional import. Re-adds Python2.4 compatibility Changed: U Zope/trunk/utilities/mkzopeinstance.py -=- Modified: Zope/trunk/utilities/mkzopeinstance.py === --- Zope/trunk/utilities/mkzopeinstance.py 2008-10-26 16:17:13 UTC (rev 92605) +++ Zope/trunk/utilities/mkzopeinstance.py 2008-10-26 18:45:54 UTC (rev 92606) @@ -167,9 +167,12 @@ def write_inituser(fn, user, password): import binascii -import hashlib +try: +from hashlib import sha256 as sha +except: +from sha import new as sha fp = open(fn, w) -pw = binascii.b2a_base64(hashlib.sha256(password).digest())[:-1] +pw = binascii.b2a_base64(sha(password).digest())[:-1] fp.write('%s:{SHA256}%s\n' % (user, pw)) fp.close() os.chmod(fn, 0644) ___ 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
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.9/doc/CHANGES.txt update
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/trunk/lib/python/AccessControl/tests/actual_python.py 'any' and 'all' are not builtins in Python 2.4.
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/trunk/lib/python/AccessControl/tests/testZopeGuards.py Clean up imports; skip testing 'key' argument to min/max in Python 2.5.
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
[Zope-Checkins] SVN: Zope/trunk/lib/python/DocumentTemplate/DT_Raise.py Import cleanup
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/ZPublisher/ Actually land the CRLF response header fix.
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-Checkins@zope.org
[Zope-Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/actual_python.py Typo.
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/AccessControl/tests/testZopeGuards.py Pass key as positional, rather than keyword, to get passing on 2.5.
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/testZopeGuards.py Make test actually exercise guards in Python 2.5.
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/doc/CHANGES.txt Note change
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/branches/2.11/lib/python/Testing/ZopeTestCase/doc/ Reverted r89899 (version bump).
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/branches/2.11/ Repair changelog faux pas.
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/trunk/ Repair changelog mishap.
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
Re: [Zope-dev] SVN: Zope/trunk/lib/python/zope/ - Revert to an older zope.testing. New one is way too new
On Sun, Oct 26, 2008 at 11:35:09AM -0400, Tres Seaver wrote: Sidnei da Silva wrote: Log message for revision 92597: - Revert to an older zope.testing. New one is way too new Before: testing svn://svn.zope.org/repos/main/zope.testing/tags/3.5.3/src/zope/testing After: testing svn://svn.zope.org/repos/main/zope.testing/tags/3.5.6/src/zope/testing Unless I'm seeing things, this is a bump to a newer version. The new one is so new it's counting version numbers in reverse? Marius Gedminas -- I used to (somewhat) sneer at people who describe themselves thus: I program HTML. Then I tried to make a web-site look as I wanted it to (ie. not grotesquely ugly), wow - perhaps they were onto something. Some think there is a pile of broken mess in our desktop, but at least you know where you are with a GtkHBox. -- Michael Meeks signature.asc Description: Digital signature ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope Tests: 4 OK, 1 Failed
Summary of messages to the zope-tests list. Period Sun Oct 26 12:00:00 2008 UTC to Mon Oct 27 12:00:00 2008 UTC. There were 5 messages: 5 from Zope Tests. Test failures - Subject: FAILED (failures=3, errors=4) : Zope-trunk Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 22:03:25 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010375.html Tests passed OK --- Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Tests Date: Sun Oct 26 21:57:24 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010371.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 21:58:54 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010372.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 22:00:25 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010373.html Subject: OK : Zope-2.11 Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 22:01:55 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010374.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
On Sun, 2008-10-26 at 14:07 -0400, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roché Compaan wrote: On Sat, 2008-10-25 at 09:20 +0200, Hedley Roos wrote: Have you measures the time needs for some standard ZCatalog queries used with a Plone site with the communication overhead with memcached? Generally spoken: I think the ZCatalog is in general fast. Queries using a fulltext index are known to be more expensive or if you have to deal with large resultsets or complex queries. No I haven't. Roche Compaan has done extensive benchmarking using funkload testing plain catalog vs module level cache vs memcached, but the tests are more about page serving than catalog query time. I'll ask him to comment more on that. I actually did some profiling as well and catalog searches were just too damn slow. The average execution time for searchResults was 100 milliseconds and this is why I told Hedley we should do some caching at query level in the first place. I experimented with this idea a couple of years back but wasn't successful due to inexperience. I was trying to cache brains which obviously leads to persistency bugs. This time around it was obvious to me that we should cache the IISet result sets. I suspect specific indexes are just performing suboptimally and needs to be improved. ExtendPathIndex in Plone seems to be one of them. The effect on performance is really awesome, now we just need to fine tune the implementation. Before (or while) we work on caching, can we try to improve the underlying indexes, and the way that applications use them? I'm pretty sure that there is a lot of room for improvement: - Plone uses too many indexes, and in particular, uses multiple text indexes. Having extra indexes around just in case is a sure lose a write time, and may even be expensive at query time (depending on the query). - Particular indexes have performance characteristics based on their designed purpose: for instance, the stock FieldIndex implementation assumes that the number of documents indexed will be the number of discrete indexable values. Using such an index in an application domain with a very large set of indexable values probably loses, and in ways which don't show up in early / small-scale testing. - I'm pretty sure that we haven't yet found the best data structure for hierarchy indexes (e.g., the Plone EPI index, or the stock Zope2 PathIndex, etc.). Something like a 'trie' might be optimal for pure prefix searching of hierarchies. - I am confident that the TopicIndex is underutiliized: it does *all* the work for a given query at write time, and can thus be blindingly fast at query time. - Other special-purpose indexes (e.g., a recent items index) would be worth a look, especially for applications with large volumes of content. I agree that one should look at improving performance without caching as well. But this is a lot harder and takes significantly more development and debugging time than introducing some form caching. So I'm not convinced that it needs to happen in a certain order. If caching gives you lots of performance with little effort now, then why shouldn't you use it? -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 27, 2008, at 13:08 , Roché Compaan wrote: On Sun, 2008-10-26 at 14:07 -0400, Tres Seaver wrote: - Plone uses too many indexes, and in particular, uses multiple text indexes. Having extra indexes around just in case is a sure lose a write time, and may even be expensive at query time (depending on the query). - Particular indexes have performance characteristics based on their designed purpose: for instance, the stock FieldIndex implementation assumes that the number of documents indexed will be the number of discrete indexable values. Using such an index in an application domain with a very large set of indexable values probably loses, and in ways which don't show up in early / small-scale testing. - I'm pretty sure that we haven't yet found the best data structure for hierarchy indexes (e.g., the Plone EPI index, or the stock Zope2 PathIndex, etc.). Something like a 'trie' might be optimal for pure prefix searching of hierarchies. - I am confident that the TopicIndex is underutiliized: it does *all* the work for a given query at write time, and can thus be blindingly fast at query time. - Other special-purpose indexes (e.g., a recent items index) would be worth a look, especially for applications with large volumes of content. I agree that one should look at improving performance without caching as well. But this is a lot harder and takes significantly more development and debugging time than introducing some form caching. So I'm not convinced that it needs to happen in a certain order. If caching gives you lots of performance with little effort now, then why shouldn't you use it? It's the typical trade-off. One course is expedient and fast for your use case now. The other requires more resources, but benefits everyone. Including those who don't want to depend on yet another package, like memcached, for performance. When it comes to integrating anything in Zope itself I'd choose the latter. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkkFssEACgkQRAx5nvEhZLITiQCgskifGYaixaj6lVLk85l6rz6E aQwAoI9PRcJHL8oZPatlHWADA0h6orCe =YLhP -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
On Mon, 2008-10-27 at 13:23 +0100, Jens Vagelpohl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 27, 2008, at 13:08 , Roché Compaan wrote: On Sun, 2008-10-26 at 14:07 -0400, Tres Seaver wrote: - Plone uses too many indexes, and in particular, uses multiple text indexes. Having extra indexes around just in case is a sure lose a write time, and may even be expensive at query time (depending on the query). - Particular indexes have performance characteristics based on their designed purpose: for instance, the stock FieldIndex implementation assumes that the number of documents indexed will be the number of discrete indexable values. Using such an index in an application domain with a very large set of indexable values probably loses, and in ways which don't show up in early / small-scale testing. - I'm pretty sure that we haven't yet found the best data structure for hierarchy indexes (e.g., the Plone EPI index, or the stock Zope2 PathIndex, etc.). Something like a 'trie' might be optimal for pure prefix searching of hierarchies. - I am confident that the TopicIndex is underutiliized: it does *all* the work for a given query at write time, and can thus be blindingly fast at query time. - Other special-purpose indexes (e.g., a recent items index) would be worth a look, especially for applications with large volumes of content. I agree that one should look at improving performance without caching as well. But this is a lot harder and takes significantly more development and debugging time than introducing some form caching. So I'm not convinced that it needs to happen in a certain order. If caching gives you lots of performance with little effort now, then why shouldn't you use it? It's the typical trade-off. One course is expedient and fast for your use case now. The other requires more resources, but benefits everyone. Including those who don't want to depend on yet another package, like memcached, for performance. I'm not tied to memcached. We started out using module level caches like zope.cache.ram but that has obvious problems when using ZEO. When it comes to integrating anything in Zope itself I'd choose the latter. Sure, we're not trying to get this into Zope, we're just sharing our experience and exploring the territory so that one can produce a third party package that really help people with the same use case (which I suspect is quite common one). -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 27, 2008, at 13:32 , Roché Compaan wrote: On Mon, 2008-10-27 at 13:23 +0100, Jens Vagelpohl wrote: When it comes to integrating anything in Zope itself I'd choose the latter. Sure, we're not trying to get this into Zope, we're just sharing our experience and exploring the territory so that one can produce a third party package that really help people with the same use case (which I suspect is quite common one). Right, it's perfectly valid to create such a third party package. The discussion just highlights a greater issue. Personally, I don't think it's good practice to focus on the expediency of working around a problem as opposed to tackling the problem directly. The Zope world is littered with add-ons that act as band-aids on real or perceived shortcomings in Zope itself. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkkFtvQACgkQRAx5nvEhZLLOrwCaA+X3iGaTDmyt3vP4q93OoTfx CNsAoJXppoHwI17ISetv4iAwoJeb+Phd =auan -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
On Mon, 2008-10-27 at 13:41 +0100, Jens Vagelpohl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 27, 2008, at 13:32 , Roché Compaan wrote: On Mon, 2008-10-27 at 13:23 +0100, Jens Vagelpohl wrote: When it comes to integrating anything in Zope itself I'd choose the latter. Sure, we're not trying to get this into Zope, we're just sharing our experience and exploring the territory so that one can produce a third party package that really help people with the same use case (which I suspect is quite common one). Right, it's perfectly valid to create such a third party package. The discussion just highlights a greater issue. Personally, I don't think it's good practice to focus on the expediency of working around a problem as opposed to tackling the problem directly. The Zope world is littered with add-ons that act as band-aids on real or perceived shortcomings in Zope itself. Improving the performance of indexes is really really hard. In this case I really don't think caching is a band-aid, it is a good solution. Even with optimised indexes, you will find that you need caching to get reasonable performance if you have a catalog with close to a million or more documents indexed. Given a large enough catalog, I would argue that caching is equally as necessary as having a large cache for a ZEO client. But caches expire and results get invalidated, and therefor we should continue to optimise indexes. With some help we should be able to contribute at this level too. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
On Mon, Oct 27, 2008 at 12:33 PM, Andreas Jung [EMAIL PROTECTED] wrote: On 27.10.2008 16:28 Uhr, Rudá Porto Filgueiras wrote: I will sugest a package called zope.memcached (like zope.sqlalchemy does for SQLAlchemy integration). That way any application who need to talk memcached can do it with out loose atomicit. I don't see a particular reason for creating a new package for here. Extend lovely.memcached and your done. There is not much need for scattering tiny functionalies into two modules here. The module world is already complicated enough. If lovely,memcached alredy is safe when some Exception is raised, discard my sugestion. It's also compatible with zope2? Andreas -- = Rudá Porto Filgueiras Weimar Consultoria http://python-blog.blogspot.com Hospedagem Plone, Django, Zope 3, Grok... http://www.pytown.com = ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCatalog caching with memcached
On 27.10.2008 17:18 Uhr, Rudá Porto Filgueiras wrote: On Mon, Oct 27, 2008 at 12:33 PM, Andreas Jung[EMAIL PROTECTED] wrote: On 27.10.2008 16:28 Uhr, Rudá Porto Filgueiras wrote: I will sugest a package called zope.memcached (like zope.sqlalchemy does for SQLAlchemy integration). That way any application who need to talk memcached can do it with out loose atomicit. I don't see a particular reason for creating a new package for here. Extend lovely.memcached and your done. There is not much need for scattering tiny functionalies into two modules here. The module world is already complicated enough. If lovely,memcached alredy is safe when some Exception is raised, discard my sugestion. It's also compatible with zope2? We are using it together with our cache tool I mentioned earlier with Zope 2.8.1. Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] catalog performance: query plan
I agree with Tres. A lot more can be done with Indexes and Catalog without caching. The most exiciting development in Catalog optimizations comes out Jarn. Helge Tesdal (iirc) did a buncha work at a RDBMS company when he was in college. He has a protoype of a query plan for ZCatalog. http://www.jarn.com/blog/catalog-query-plan I would like to ask Roche and others to look at the Query Plan. Caching is a total PITA because invalidation machinery becomes overwhelming complex and unwieldly quickly in production. -- Alan Runyan Enfold Systems, Inc. http://www.enfoldsystems.com/ phone: +1.713.942.2377x111 fax: +1.832.201.8856 ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Proposal: Backporting some Python 2.5/2.6 fixes
On 27.10.2008 18:36 Uhr, Sidnei da Silva wrote: Hi all, I would like to propose backporting some of the fixes needed for Python 2.5 and 2.6 all the way down to Zope 2.10. The fixes that would be backported would only be those that deal with syntax changes (eg: 'with' and 'as' keyword being used as variables, relative imports) and some C-level changes, to Acquisition and zope.app.container if I recall. I would *not* backport changes to RestrictedPython because those are actually features (support for newer versions of Python) as opposed to the other changes, which are just 'bugfixes' IMHO. Why do we need these backports on the current maintenance branches? Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Proposal: Backporting some Python 2.5/2.6 fixes
Hi all, I would like to propose backporting some of the fixes needed for Python 2.5 and 2.6 all the way down to Zope 2.10. The fixes that would be backported would only be those that deal with syntax changes (eg: 'with' and 'as' keyword being used as variables, relative imports) and some C-level changes, to Acquisition and zope.app.container if I recall. I would *not* backport changes to RestrictedPython because those are actually features (support for newer versions of Python) as opposed to the other changes, which are just 'bugfixes' IMHO. Would anyone be against this? -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 Skype zopedc ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Proposal: Backporting some Python 2.5/2.6 fixes
On Mon, Oct 27, 2008 at 3:42 PM, Andreas Jung [EMAIL PROTECTED] wrote: Why do we need these backports on the current maintenance branches? They are small cleanups that could potentially allow someone to run Python 2.5 or 2.6 if they really really really wanted to, but note should be made that it would be completely and utterly unsupported. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 Skype zopedc ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Proposal: Backporting some Python 2.5/2.6 fixes
On 27.10.2008 18:55 Uhr, Sidnei da Silva wrote: On Mon, Oct 27, 2008 at 3:42 PM, Andreas Jung[EMAIL PROTECTED] wrote: Why do we need these backports on the current maintenance branches? They are small cleanups that could potentially allow someone to run Python 2.5 or 2.6 if they really really really wanted to, but note should be made that it would be completely and utterly unsupported. Please create branches first and then lets review the changes. What is the state of the compatability of Z3 modules with Python 2.5/2.6 as used in Zope 2.10/2.11? Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Proposal: Backporting some Python 2.5/2.6 fixes
On Mon, Oct 27, 2008 at 4:06 PM, Andreas Jung [EMAIL PROTECTED] wrote: Please create branches first and then lets review the changes. Great. What is the state of the compatability of Z3 modules with Python 2.5/2.6 as used in Zope 2.10/2.11? Hard to tell at this point. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214 Skype zopedc ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Tests: 4 OK, 1 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Subject: FAILED (failures=3, errors=4) : Zope-trunk Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 22:03:25 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010375.html Sidnei, First, thanks for working to get the GSoC 2.5 / 2.6 stuff landed! Second, I'm pretty sure that last night's failures are all due to landing the GSoC branch, as you were the only person checking into the Zope2 trunk yesterday: - AccessControl.tests.testZopeGuards: I have fixed these tests to pass under Python 2.4 ('all', 'any' arent in builtins; 'max' and 'min' don't take a 'key' argument). - Products.Five.browser.tests.resource_ftest.txt I have narrowed these failures down to OFS.SimpleItem: if I revert the change to 'raise_standardErrorMessage', those tests pass again. I'm not confident, however, that I can figure out why they are breaking. - zope.testbrowser.fixed-bugs.txt: I haven't gotten to these. I think we need to keep the trunk passing under Python 2.4 for now, and we need to be running 'test.py --all' to flush out the changes. Can you look at the rest here? Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJBh3F+gerLs4ltQ4RAi0uAKC4c3bKFk4E3EHCoJBIhnAIRSNSAQCfWFKz eGaHoDHpfk5f/1E4Jn3VIh4= =a/PS -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] [Checkins] SVN: Zope/trunk/lib/python/AccessControl/tests/actual_python.py 'any' and 'all' are not builtins in Python 2.4.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zvezdan Petkovic wrote: Is this a typo? Yes, thanks for the catch. On Oct 27, 2008, at 1:57 PM, Tres Seaver wrote: def f13(): -assert any([True, True, True]) == True -assert any([True, False, True]) == True -assert any([False, False, False]) == False +try: +all I thinks this should be any instead of 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() Arguably, if there's an all, there will be any, so it will work the same, but looks a little strange to try for all and then use any in assertion. Best regards, Zvezdan - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJBh4o+gerLs4ltQ4RAtGGAJ45034n4Wyzc0ZjTHC2WMlA8p8auwCfWKhw BN0IJVXPJKAoJmPgj8Q4/Vw= =08ye -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope Tests: 4 OK, 1 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tres Seaver wrote: Subject: FAILED (failures=3, errors=4) : Zope-trunk Python-2.4.4 : Linux From: Zope Tests Date: Sun Oct 26 22:03:25 EDT 2008 URL: http://mail.zope.org/pipermail/zope-tests/2008-October/010375.html Sidnei, First, thanks for working to get the GSoC 2.5 / 2.6 stuff landed! Second, I'm pretty sure that last night's failures are all due to landing the GSoC branch, as you were the only person checking into the Zope2 trunk yesterday: - AccessControl.tests.testZopeGuards: I have fixed these tests to pass under Python 2.4 ('all', 'any' arent in builtins; 'max' and 'min' don't take a 'key' argument). - Products.Five.browser.tests.resource_ftest.txt I have narrowed these failures down to OFS.SimpleItem: if I revert the change to 'raise_standardErrorMessage', those tests pass again. I'm not confident, however, that I can figure out why they are breaking. - zope.testbrowser.fixed-bugs.txt: I haven't gotten to these. I think we need to keep the trunk passing under Python 2.4 for now, and we need to be running 'test.py --all' to flush out the changes. Can you look at the rest here? Hmm, the same tests break on Python 2.5 as well. Note that these fail during the functional tests, and only if we run all tests:: $ /path/to/python2.5 test.py --all Running just the tests in Products.Five succeeds:: $ /path/to/python2.5 test.py --all -s Products.Five Maybe we have a bad layer lying around? Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJBklK+gerLs4ltQ4RAig1AKDZOoQF0N3dGsG9Vjs03kj8y1bukwCfXZfl lZOYuMT6RAM+do6rxCYy9b0= =Pdy5 -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope] unknown IndexError 41
hello! everything was working fine until a couple of days ago and now.. Obviously I have no exact traceback of what was done on the machine, but I updated my gentoo box by emerging some apps (nothing apparently involving plone/zope/python/mysql...) :-( Now I really do not know where to bang my head..perhaps on re module?? thanks.. Stefano. when I call the external method zope returns this weird 'error 41': ... IndexError Value 41 details: Request URL http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import Exception Type IndexError Exception Value 41 Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 225, in __call__ __traceback_info__: ((Folder at /bibliosafety/admins_home/cabi_mgmt/import_tools, HTTPRequest, URL=http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import), {}, None) Module /var/lib/zope/zope-inst01/Extensions/cabi_import_em.py, line 38, in cabi_import IndexError: 41 Display traceback as text REQUEST form cabi_local_path '/home/stefano/biosafe200810.tag' cookies __ac 'dTAwMDAwMDE6dTAwMDAwMDE%3D' tree-s 'eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew' lazy items SESSION bound method SessionDataManager.getSessionData of SessionDataManager at /session_data_manager other TraversalRequestNameStack [] AUTHENTICATED_USER PloneUser 'u001' URL 'http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_URL 'http://localhost:8081' AUTHENTICATION_PATH 'bibliosafety' __ac 'dTAwMDAwMDE6dTAwMDAwMDE%3D' PUBLISHED ExternalMethod at /bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import cabi_local_path '/home/stefano/biosafe200810.tag' ACTUAL_URL 'http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' URL0 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import URL1 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools URL2 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt URL3 http://localhost:8081/bibliosafety/admins_home URL4 http://localhost:8081/bibliosafety URL5 http://localhost:8081 BASE0 http://localhost:8081 BASE1 http://localhost:8081 BASE2 http://localhost:8081/bibliosafety BASE3 http://localhost:8081/bibliosafety/admins_home BASE4 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt BASE5 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools BASE6 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import environ HTTP_COOKIE '__ac=dTAwMDAwMDE6dTAwMDAwMDE%3D; tree-s=eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew' SERVER_SOFTWARE 'Zope/(Zope 2.9.8-final, python 2.4.4, linux2) ZServer/1.1 Plone/2.5.5' SCRIPT_NAME '' REQUEST_METHOD 'GET' PATH_INFO '/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_PROTOCOL 'HTTP/1.1' QUERY_STRING 'cabi_local_path=/home/stefano/biosafe200810.tag' channel.creation_time 1225111356 CONNECTION_TYPE 'Keep-Alive' HTTP_ACCEPT_CHARSET 'iso-8859-1, utf-8;q=0.5, *;q=0.5' HTTP_USER_AGENT 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.9 (like Gecko)' HTTP_REFERER 'http://localhost:8081/bibliosafety/admins_home/index_html' SERVER_NAME '0.0.0.0' REMOTE_ADDR '127.0.0.1' PATH_TRANSLATED '/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_PORT '8081' HTTP_PRAGMA 'no-cache' HTTP_HOST 'localhost:8081' HTTP_CACHE_CONTROL 'no-cache' HTTP_ACCEPT 'text/html, image/jpeg, image/png, text/*, image/*, */*' GATEWAY_INTERFACE 'CGI/1.1' HTTP_ACCEPT_LANGUAGE 'it, en' HTTP_ACCEPT_ENCODING 'x-gzip, x-deflate, gzip, deflate' lines: 01 import re 02 def cabi_import(self, REQUEST): ... 30 for cabi_data_record in cabi_data_recordset: 31 temp_dict_row = {} 32 fieldpos = 0 33 counter = 0 34 calculate the total number of fields of the record 35 fieldmax = self.sql_queries.query_05() 36 take each field content until the end of the record 37 while fieldpos fieldmax[0][col_count]: 38 cabi_data_field = cabi_data_record[fieldpos] 39 strips excess whitespaces 40 re_pattern = re.compile('\s+') 41 cabi_data_field = re_pattern.sub(' ', cabi_data_field) ... other regexps ... query_05 = SELECT COUNT(*) AS 'col_count' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cabi_data' ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unknown IndexError 41
The traceback tells you where the error occurs: On 27.10.2008 14:04 Uhr, PeaceLove wrote: 37 while fieldpos fieldmax[0][col_count]: 38 cabi_data_field = cabi_data_record[fieldpos] Further investigations are up to you - we have no idea what's in your database or what has changed. The only thing that the traceback tells us: you're accessing data at index position 41 that does not exist. Take pdb for debugging or add print statement for making your code more verbose but the investigations must happen on your side. -aj -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope Plone development, Consulting begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] unknown IndexError 41
hello! everything was working fine until a couple of days ago and now.. Obviously I have no exact traceback of what was done on the machine, but I updated my gentoo box by emerging some apps (nothing apparently involving plone/zope/python/mysql...) :-( Now I really do not know where to bang my head..perhaps on re module?? thanks.. Stefano. when I call the external method zope returns this weird 'error 41': ... IndexError Value 41 details: Request URL http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import Exception Type IndexError Exception Value 41 Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 225, in __call__ __traceback_info__: ((Folder at /bibliosafety/admins_home/cabi_mgmt/import_tools, HTTPRequest, URL=http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import), {}, None) Module /var/lib/zope/zope-inst01/Extensions/cabi_import_em.py, line 38, in cabi_import IndexError: 41 Display traceback as text REQUEST form cabi_local_path '/home/stefano/biosafe200810.tag' cookies __ac 'dTAwMDAwMDE6dTAwMDAwMDE%3D' tree-s 'eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew' lazy items SESSION bound method SessionDataManager.getSessionData of SessionDataManager at /session_data_manager other TraversalRequestNameStack [] AUTHENTICATED_USER PloneUser 'u001' URL 'http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_URL 'http://localhost:8081' AUTHENTICATION_PATH 'bibliosafety' __ac 'dTAwMDAwMDE6dTAwMDAwMDE%3D' PUBLISHED ExternalMethod at /bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import cabi_local_path '/home/stefano/biosafe200810.tag' ACTUAL_URL 'http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' URL0 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import URL1 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools URL2 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt URL3 http://localhost:8081/bibliosafety/admins_home URL4 http://localhost:8081/bibliosafety URL5 http://localhost:8081 BASE0 http://localhost:8081 BASE1 http://localhost:8081 BASE2 http://localhost:8081/bibliosafety BASE3 http://localhost:8081/bibliosafety/admins_home BASE4 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt BASE5 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools BASE6 http://localhost:8081/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import environ HTTP_COOKIE '__ac=dTAwMDAwMDE6dTAwMDAwMDE%3D; tree-s=eJzT0MgpMOQKVneEA1dbda4CI67EkgJjLj0AeGcHew' SERVER_SOFTWARE 'Zope/(Zope 2.9.8-final, python 2.4.4, linux2) ZServer/1.1 Plone/2.5.5' SCRIPT_NAME '' REQUEST_METHOD 'GET' PATH_INFO '/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_PROTOCOL 'HTTP/1.1' QUERY_STRING 'cabi_local_path=/home/stefano/biosafe200810.tag' channel.creation_time 1225111356 CONNECTION_TYPE 'Keep-Alive' HTTP_ACCEPT_CHARSET 'iso-8859-1, utf-8;q=0.5, *;q=0.5' HTTP_USER_AGENT 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.9 (like Gecko)' HTTP_REFERER 'http://localhost:8081/bibliosafety/admins_home/index_html' SERVER_NAME '0.0.0.0' REMOTE_ADDR '127.0.0.1' PATH_TRANSLATED '/bibliosafety/admins_home/cabi_mgmt/import_tools/cabi_import' SERVER_PORT '8081' HTTP_PRAGMA 'no-cache' HTTP_HOST 'localhost:8081' HTTP_CACHE_CONTROL 'no-cache' HTTP_ACCEPT 'text/html, image/jpeg, image/png, text/*, image/*, */*' GATEWAY_INTERFACE 'CGI/1.1' HTTP_ACCEPT_LANGUAGE 'it, en' HTTP_ACCEPT_ENCODING 'x-gzip, x-deflate, gzip, deflate' lines: 01 import re 02 def cabi_import(self, REQUEST): ... 30 for cabi_data_record in cabi_data_recordset: 31 temp_dict_row = {} 32 fieldpos = 0 33 counter = 0 34 calculate the total number of fields of the record 35 fieldmax = self.sql_queries.query_05() 36 take each field content until the end of the record 37 while fieldpos fieldmax[0][col_count]: 38 cabi_data_field = cabi_data_record[fieldpos] 39 strips excess whitespaces 40 re_pattern = re.compile('\s+') 41 cabi_data_field = re_pattern.sub(' ', cabi_data_field) ... other regexps ... query_05 = SELECT COUNT(*) AS 'col_count' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cabi_data' ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] find zodb object sizes
Hi Yuri and Andreas! Andreas Jung wrote: On 20.10.2008 17:46 Uhr, Yuri wrote: Hi! I would like to run a script to see what objects size is, printing the zodb path. analize.py gives me a floating point division error, so I would like to ask if there's a simpler way to see what there's inside the ZODB. The mentioned script is probably analyze.py, not analize (see here: http://www.urbandictionary.com/define.php?defid=1214122term=analize :-)) It would be helpful to see the traceback in order to fix a potential problem with the script. Not related to the problem, but the two installments of the script created by buildout ./parts/zope2/utilities/ZODBTools/analyze.py ./parts/zope2/lib/python/ZODB/scripts/analyze.py are executed with python2.3. Maybe this can be updated. Markus -aj ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope's clipboard
Is there a way to programmatically remove items from the clipboard. Regards Garry ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope's clipboard
On 27.10.2008 18:05 Uhr, Garry Saddington wrote: Is there a way to programmatically remove items from the clipboard. There nothing like a clipboard. The information you consider as clipboard is stored as __cp cookie on the client side. -aj begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope's clipboard
On Monday 27 October 2008 17:37, Andreas Jung wrote: On 27.10.2008 18:05 Uhr, Garry Saddington wrote: Is there a way to programmatically remove items from the clipboard. There nothing like a clipboard. The information you consider as clipboard is stored as __cp cookie on the client side. OK, so how do I expire it? expireCookie('__cp') is not working for me Regards Garry ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zope's clipboard(solved)
On Monday 27 October 2008 18:35, Garry Saddington wrote: On Monday 27 October 2008 17:37, Andreas Jung wrote: On 27.10.2008 18:05 Uhr, Garry Saddington wrote: Is there a way to programmatically remove items from the clipboard. There nothing like a clipboard. The information you consider as clipboard is stored as __cp cookie on the client side. OK, so how do I expire it? expireCookie('__cp') is not working for me Regards Garry Found it : expireCookie('__cp',path='/') Garry ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )