Re: [Zope-dev] My bug day wrap-up
Am 06.12.2010, 22:35 Uhr, schrieb Charlie Clark charlie.cl...@clark-consulting.eu: I don't have an account and I've never made a release. I've just tested the svn checkout of zope.publisher with a Zope 2.12 + CMF-based site I have and the change does what it should: where Zope was previously guessing latin-1 for Safari and Internet Explorer and raising unicode errors it now publishes happily! Could you do the release? Charlie -- Charlie Clark Managing Director Clark Consulting Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope Tests: 76 OK, 16 Failed
Summary of messages to the zope-tests list. Period Mon Dec 13 12:00:00 2010 UTC to Tue Dec 14 12:00:00 2010 UTC. There were 92 messages: 8 from Zope Tests, 4 from buildbot at pov.lt, 30 from buildbot at winbot.zope.org, 11 from ccomb at free.fr, 39 from jdriessen at thehealthagency.com. Test failures - Subject: FAILED : winbot / ztk_10 py_244_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 16:02:23 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026515.html Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win From: jdriessen at thehealthagency.com Date: Mon Dec 13 19:02:27 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026536.html Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win From: jdriessen at thehealthagency.com Date: Mon Dec 13 19:03:27 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026537.html Subject: FAILED : winbot / z3c.xmlhttp_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 22:13:52 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026578.html Subject: FAILED : winbot / z3c.language.negotiator_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 22:34:25 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026579.html Subject: FAILED : winbot / zope.broken_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 22:51:38 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026580.html Subject: FAILED : winbot / z3c.ptcompat_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 22:52:11 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026581.html Subject: FAILED : winbot / z3c.contents_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 22:59:39 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026582.html Subject: FAILED : winbot / z3c.zrtresource_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:05:49 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026584.html Subject: FAILED : winbot / zope.browserresource_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:10:13 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026585.html Subject: FAILED : winbot / z3c.rml_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:16:21 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026586.html Subject: FAILED : winbot / zope.container_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:19:40 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026587.html Subject: FAILED : winbot / z3c.jsonrpcproxy_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:19:52 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026588.html Subject: FAILED : winbot / zope.traversing_py_265_32 From: buildbot at winbot.zope.org Date: Mon Dec 13 23:45:35 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026589.html Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win From: jdriessen at thehealthagency.com Date: Tue Dec 14 06:02:49 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026600.html Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win From: jdriessen at thehealthagency.com Date: Tue Dec 14 06:03:41 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026601.html Tests passed OK --- Subject: OK : winbot / ztk_dev py_254_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 15:18:27 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026510.html Subject: OK : winbot / ztk_dev py_265_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 15:26:21 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026511.html Subject: OK : winbot / ztk_dev py_265_win64 From: buildbot at winbot.zope.org Date: Mon Dec 13 15:35:30 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026512.html Subject: OK : winbot / ztk_dev py_270_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 15:44:14 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026513.html Subject: OK : winbot / ztk_dev py_270_win64 From: buildbot at winbot.zope.org Date: Mon Dec 13 15:52:51 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026514.html Subject: OK : winbot / ztk_10 py_254_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 16:10:53 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026516.html Subject: OK : winbot / ztk_10 py_265_win32 From: buildbot at winbot.zope.org Date: Mon Dec 13 16:19:24 EST 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-December/026517.html Subject: OK : winbot / ztk_10 py_265_win64 From: buildbot at winbot.zope.org Date: Mon Dec 13 16:27:48 EST 2010 URL:
Re: [Zope-dev] SVN: Zope/branches/2.13/ fix `LazyMap` to avoid unnecessary function calls when not accessing items in order (fixes http://dev.plone.org/plone/ticket/9018)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/14/2010 09:12 AM, Andreas Zeidler wrote: Log message for revision 118863: fix `LazyMap` to avoid unnecessary function calls when not accessing items in order (fixes http://dev.plone.org/plone/ticket/9018) First, thanks for looking into this issue. Changed: U Zope/branches/2.13/doc/CHANGES.rst U Zope/branches/2.13/src/Products/ZCatalog/Lazy.py U Zope/branches/2.13/src/Products/ZCatalog/tests/test_lazy.py -=- Modified: Zope/branches/2.13/doc/CHANGES.rst === --- Zope/branches/2.13/doc/CHANGES.rst2010-12-14 13:24:24 UTC (rev 118862) +++ Zope/branches/2.13/doc/CHANGES.rst2010-12-14 14:12:11 UTC (rev 118863) @@ -11,6 +11,8 @@ Bugs Fixed ++ +- Fix `LazyMap` to avoid unnecessary function calls. + - LP 686664: WebDAV Lock Manager ZMI view wasn't accessible. 2.13.1 (2010-12-07) Modified: Zope/branches/2.13/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.13/src/Products/ZCatalog/Lazy.py 2010-12-14 13:24:24 UTC (rev 118862) +++ Zope/branches/2.13/src/Products/ZCatalog/Lazy.py 2010-12-14 14:12:11 UTC (rev 118863) @@ -145,44 +145,28 @@ # Don't access data until necessary def __init__(self, func, seq, length=None): -self._seq = seq -self._data = [] -self._func = func +self._seq=seq +self._func=func if length is not None: -self._len = length +self._len=length Please don't un-PEP8 a cleaned-up module: leave spaces around operators. If that was unintentional (maybe you pasted from a copy of a file made before the module was cleaned up?), then you still need to review the diff and edit out unintended changes first. else: self._len = len(seq) +self._marker = object() +self._data = [self._marker] * self._len Have you measured the impact of pre-allocating here for very large sequences? You are trading off space in return for speed for the (relatively) rare case of random-access indexing off-the end. I'm *sure* that is a not a good trade-off for all cases: the catalog is often used for queries which return result sets in the order of 10^5 or more objects, and *very* rarely is it accessed randomly (I had never seen it before reading the bug entry you cite). The normal case is to take the first few entries (batch_size * batch_number) from the huge set. I think you would be better off finding a way to inject your style of LazyMap into the catalog for the random-access case, e.g., by passing '_lazy_map' into the methods you are using. BTW, another interesting alternative impplementation might be to use a dictionary instead of a list for 'data'. You could then avoid any pre-allocation at all. -def __getitem__(self, index): -data = self._data +def __getitem__(self,index): +data=self._data try: -s = self._seq +s=self._seq except AttributeError: return data[index] While we're at it, the 'try: ... except:' here is wasteful and slow. Lazy objects aren't persistent, and the '_seq' attribute is added unconditionally in '__init__'. -i = index -if i 0: -i = len(self) + i -if i 0: -raise IndexError(index) +value = data[index] +if value is self._marker: +value = data[index] = self._func(s[index]) +return value -ind = len(data) -if i ind: -return data[i] -ind = ind - 1 -func = self._func -while i ind: -try: -ind = ind + 1 -data.append(func(s[ind])) -except IndexError: -del self._func -del self._seq -raise IndexError(index) -return data[i] - - Finally, whatever cleanup we settle on also needs to be forward-ported to the trunk. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0HpV0ACgkQ+gerLs4ltQ4FsQCg2zpfEn+Hih6lNBqboQJDDBl5 7cIAn1rnqKtXsBv7j/s+PlcK0Nals7m1 =b/uG -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )