[Zope-Checkins] SVN: Zope/trunk/ `tempstorage` should only be a test requirement as it depends on `ZODB3 [test]` itself
Log message for revision 127985: `tempstorage` should only be a test requirement as it depends on `ZODB3 [test]` itself Changed: U Zope/trunk/buildout.cfg U Zope/trunk/setup.py -=- Modified: Zope/trunk/buildout.cfg === --- Zope/trunk/buildout.cfg 2012-10-13 17:04:35 UTC (rev 127984) +++ Zope/trunk/buildout.cfg 2012-10-13 19:37:42 UTC (rev 127985) @@ -31,7 +31,7 @@ import sys import warnings if sys.version_info = (2, 7): warnings.simplefilter('default') -eggs = Zope2 +eggs = Zope2 [test] [scripts] Modified: Zope/trunk/setup.py === --- Zope/trunk/setup.py 2012-10-13 17:04:35 UTC (rev 127984) +++ Zope/trunk/setup.py 2012-10-13 19:37:42 UTC (rev 127985) @@ -65,7 +65,6 @@ 'initgroups', 'pytz', 'setuptools', - 'tempstorage', 'transaction', 'zdaemon', 'zExceptions', @@ -106,7 +105,9 @@ 'zope.traversing', 'zope.viewlet', ] + additional_install_requires, - +extras_require={ + 'test': ['tempstorage'], +}, include_package_data=True, zip_safe=False, entry_points={ ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.13/ backport r127985 onto the 2.13 branch
Log message for revision 127986: backport r127985 onto the 2.13 branch Changed: U Zope/branches/2.13/buildout.cfg U Zope/branches/2.13/setup.py -=- Modified: Zope/branches/2.13/buildout.cfg === --- Zope/branches/2.13/buildout.cfg 2012-10-13 19:37:42 UTC (rev 127985) +++ Zope/branches/2.13/buildout.cfg 2012-10-13 19:45:24 UTC (rev 127986) @@ -30,7 +30,7 @@ import sys import warnings if sys.version_info = (2, 7): warnings.simplefilter('default') -eggs = Zope2 +eggs = Zope2 [test] [scripts] Modified: Zope/branches/2.13/setup.py === --- Zope/branches/2.13/setup.py 2012-10-13 19:37:42 UTC (rev 127985) +++ Zope/branches/2.13/setup.py 2012-10-13 19:45:24 UTC (rev 127986) @@ -65,7 +65,6 @@ 'initgroups', 'pytz', 'setuptools', - 'tempstorage', 'transaction', 'zdaemon', 'zExceptions', @@ -113,7 +112,9 @@ 'Products.PythonScripts', 'Products.StandardCacheManagers', ] + additional_install_requires, - +extras_require={ + 'test': ['tempstorage'], +}, include_package_data=True, zip_safe=False, entry_points={ ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py back-port c118896 from 2.13
Log message for revision 118922: back-port c118896 from 2.13 Changed: U Zope/branches/2.12/src/Products/ZCatalog/Lazy.py -=- Modified: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-15 09:29:34 UTC (rev 118921) +++ Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-15 09:55:29 UTC (rev 118922) @@ -134,20 +134,16 @@ def __init__(self, func, seq, length=None): self._seq=seq +self._data={} self._func=func if length is not None: self._len=length else: self._len = len(seq) -self._marker = object() -self._data = [self._marker] * self._len def __getitem__(self,index): data=self._data -try: s=self._seq -except AttributeError: return data[index] - -value = data[index] -if value is self._marker: -value = data[index] = self._func(s[index]) +if index in data: +return data[index] +value = data[index] = self._func(self._seq[index]) return value class LazyFilter(Lazy): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py pep8 clean-up of `LazyMap`
Log message for revision 118924: pep8 clean-up of `LazyMap` Changed: U Zope/branches/2.12/src/Products/ZCatalog/Lazy.py -=- Modified: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-15 09:59:42 UTC (rev 118923) +++ Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-15 10:08:49 UTC (rev 118924) @@ -133,14 +133,16 @@ # Don't access data until necessary def __init__(self, func, seq, length=None): -self._seq=seq -self._data={} -self._func=func -if length is not None: self._len=length -else: self._len = len(seq) +self._seq = seq +self._data = {} +self._func = func +if length is not None: +self._len = length +else: +self._len = len(seq) -def __getitem__(self,index): -data=self._data +def __getitem__(self, index): +data = self._data if index in data: return data[index] value = data[index] = self._func(self._seq[index]) ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
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)
hi tres, On 14.12.2010, at 18:11, Tres Seaver wrote: On 12/14/2010 09:12 AM, Andreas Zeidler wrote: 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. yes, in was indeed unintentional, or rather unfortunate. i've originally worked on the 2.12 branch (in a plone 4 buildout) where i think hanno's pep8-related changes haven't been applied/back-ported yet. after that i pasted the version into 2.13 (and yes, the commit order was the other way round :)) and was in fact wondering about the longer diff when hanno (who was actually sitting next to me) pointed out he had changed the one-line if: and else: expressions on that branch. however, my alias for svn diff tells diff to not show white space changes so i missed the now again removed spaces around the =. anyway, it's fixed in c118895. 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? i had not, but have now. turns out the allocation makes a difference earlier than i would have expected: accessing the first 20 items of the map is slower with the new version starting at sequences of a little more than 2000 items. and of course it (relatively) gets slower the longer the sequence is. setting up a 10^5 empty sequence takes about 0.5 ms on my machine. 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. true, but the fix wasn't only about this use-case. it's mainly about avoiding extra function calls when fetching a batch other than the first. so far the map function wall called for every item up to the one accessed, e.g. for the 5th batch of 20 items each, you'd end up with 80 unnecessary (and possible expensive) calls. or iow, the old version wasn't really as lazy as it should have been… :) 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. i disagree. i think it should be fixed properly upstream. we should really avoid all that monkey-patching all over the place. but see below… 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. with the benchmark in place, i was curious and tried that as well: it beats the other versions independently of the sequence length and the number of accessed items, both sequentially and repeatedly over a single batch. in the benchmark they're accessed from the start, but skipping a few batches would make it even faster anyway. hence i've updated the code again in c118896. please let me know what you think, or if you want the test script i've been using. 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__'. you're right, this should be cleaned up as well. but since this isn't my code i was trying to keep the diff minimal (like on 2.12, i.e. in c118864, it obviously didn't work in the other one :)). in any case, it's also gone with c118896. cheers, andi -- pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 4.0 released! -- http://plone.org/4 PGP.sig Description: This is a digitally signed message part ___ 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-Checkins] 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)
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) 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.rst 2010-12-14 13:24:24 UTC (rev 118862) +++ Zope/branches/2.13/doc/CHANGES.rst 2010-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.py2010-12-14 13:24:24 UTC (rev 118862) +++ Zope/branches/2.13/src/Products/ZCatalog/Lazy.py2010-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 else: self._len = len(seq) +self._marker = object() +self._data = [self._marker] * self._len -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] -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] - - class LazyFilter(Lazy): # Act like a sequence, but get data from a filtering process. # Don't access data until necessary. Only data for which test(data) Modified: Zope/branches/2.13/src/Products/ZCatalog/tests/test_lazy.py === --- Zope/branches/2.13/src/Products/ZCatalog/tests/test_lazy.py 2010-12-14 13:24:24 UTC (rev 118862) +++ Zope/branches/2.13/src/Products/ZCatalog/tests/test_lazy.py 2010-12-14 14:12:11 UTC (rev 118863) @@ -113,7 +113,17 @@ lmap = self._createLMap(filter, seq1, seq2, seq3) self._compare(lmap, [str(x).lower() for x in (seq1 + seq2 + seq3)]) +def testMapFuncIsOnlyCalledAsNecessary(self): +seq = range(10) +count = [0] # closure only works with list, and `nonlocal` in py3 +def func(x): +count[0] += 1 +return x +lmap = self._createLMap(func, seq) +self.assertEqual(lmap[5], 5) +self.assertEqual(count[0], 1) + class TestLazyFilter(TestLazyCat): def _createLSeq(self, *seq): ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/ back-port c118863 from 2.13
Log message for revision 118864: back-port c118863 from 2.13 Changed: U Zope/branches/2.12/doc/CHANGES.rst U Zope/branches/2.12/src/Products/ZCatalog/Lazy.py U Zope/branches/2.12/src/Products/ZCatalog/tests/testLazySequences.py -=- Modified: Zope/branches/2.12/doc/CHANGES.rst === --- Zope/branches/2.12/doc/CHANGES.rst 2010-12-14 14:12:11 UTC (rev 118863) +++ Zope/branches/2.12/doc/CHANGES.rst 2010-12-14 14:13:14 UTC (rev 118864) @@ -11,6 +11,7 @@ Bugs Fixed ++ +- Fix `LazyMap` to avoid unnecessary function calls. 2.12.14 (2010-12-07) Modified: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-14 14:12:11 UTC (rev 118863) +++ Zope/branches/2.12/src/Products/ZCatalog/Lazy.py2010-12-14 14:13:14 UTC (rev 118864) @@ -134,36 +134,22 @@ def __init__(self, func, seq, length=None): self._seq=seq -self._data=[] self._func=func if length is not None: self._len=length else: self._len = len(seq) +self._marker = object() +self._data = [self._marker] * self._len def __getitem__(self,index): - data=self._data try: s=self._seq except AttributeError: return data[index] -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] - class LazyFilter(Lazy): # Act like a sequence, but get data from a filtering process. # Don't access data until necessary. Only data for which test(data) Modified: Zope/branches/2.12/src/Products/ZCatalog/tests/testLazySequences.py === --- Zope/branches/2.12/src/Products/ZCatalog/tests/testLazySequences.py 2010-12-14 14:12:11 UTC (rev 118863) +++ Zope/branches/2.12/src/Products/ZCatalog/tests/testLazySequences.py 2010-12-14 14:13:14 UTC (rev 118864) @@ -98,7 +98,17 @@ lmap = self._createLMap(filter, seq1, seq2, seq3) self._compare(lmap, [str(x).lower() for x in (seq1 + seq2 + seq3)]) +def testMapFuncIsOnlyCalledAsNecessary(self): +seq = range(10) +count = [0] # closure only works with list, and `nonlocal` in py3 +def func(x): +count[0] += 1 +return x +lmap = self._createLMap(func, seq) +self.assertEqual(lmap[5], 5) +self.assertEqual(count[0], 1) + class TestLazyFilter(TestLazyCat): def _createLSeq(self, *seq): return self._createLFilter(lambda x: True, *seq) ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.13/src/Products/ZCatalog/Lazy.py restore pep8 clean-ups (from c115289) accidentally reverted in c118863
Log message for revision 118895: restore pep8 clean-ups (from c115289) accidentally reverted in c118863 Changed: U Zope/branches/2.13/src/Products/ZCatalog/Lazy.py -=- Modified: Zope/branches/2.13/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.13/src/Products/ZCatalog/Lazy.py2010-12-15 06:49:42 UTC (rev 118894) +++ Zope/branches/2.13/src/Products/ZCatalog/Lazy.py2010-12-15 07:38:21 UTC (rev 118895) @@ -145,19 +145,19 @@ # Don't access data until necessary def __init__(self, func, seq, length=None): -self._seq=seq -self._func=func +self._seq = seq +self._func = func if length is not None: -self._len=length +self._len = length else: self._len = len(seq) self._marker = object() self._data = [self._marker] * self._len -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] ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.13/src/Products/ZCatalog/Lazy.py avoid pre-allocating the entire sequence, which adds unnecessary overhead in most cases. instead use a dictionary to remember the
Log message for revision 118896: avoid pre-allocating the entire sequence, which adds unnecessary overhead in most cases. instead use a dictionary to remember the already mapped sequence items. Changed: U Zope/branches/2.13/src/Products/ZCatalog/Lazy.py -=- Modified: Zope/branches/2.13/src/Products/ZCatalog/Lazy.py === --- Zope/branches/2.13/src/Products/ZCatalog/Lazy.py2010-12-15 07:38:21 UTC (rev 118895) +++ Zope/branches/2.13/src/Products/ZCatalog/Lazy.py2010-12-15 07:38:29 UTC (rev 118896) @@ -146,24 +146,18 @@ def __init__(self, func, seq, length=None): self._seq = seq +self._data = {} self._func = func if length is not None: self._len = length else: self._len = len(seq) -self._marker = object() -self._data = [self._marker] * self._len def __getitem__(self, index): data = self._data -try: -s = self._seq -except AttributeError: +if index in data: return data[index] - -value = data[index] -if value is self._marker: -value = data[index] = self._func(s[index]) +value = data[index] = self._func(self._seq[index]) return value ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope-dev] Possible DateTime timezone-related regression in Zope 2.12
On 11.01.10 01:47, Martin Aspeli wrote: Laurence Rowe wrote: I believe the current behaviour is intentional to preserve backwards compatibility. See the discussion starting here: https://mail.zope.org/pipermail/zope-dev/2007-October/030042.html Maybe it was 'fixed' on 2.10 branch some time later. Sorry, just to be clear - which behaviour is correct? The 2.10 one or the 2.12 one? imho, the one from 2.10. i think about anyone would expect to have a simple date given being interpreted as from their current time zone, no? also, look at the following (using `DateTime` 2.12): $ ~/plone/coredev/branches/4.0/bin/zopepy from DateTime import DateTime now = DateTime() now == DateTime(now) True now == DateTime(now.ISO()) False this is a _pretty_ behaviour, to say the least! :) My vote would go for the 2.10 one - in the absence of timezone information, assume local timezone, not GMT. +1, definitely. If we agree on that, is it clear what needs to be changed for this to work? yes, i believe it is. we need to revert Laurence' revert (http://zope3.pov.lt/trac/changeset/81213) and fix those BBB issues in another way. Can we also agree that it's very bad for 2.10 and 2.12 to exhibit different behaviour here? +1 andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 4.0 alpha released! -- http://plone.org/products/plone/ ___ 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 )
Re: [Zope-dev] Possible DateTime timezone-related regression in Zope 2.12
On 05.03.10 10:53, Andreas Zeidler wrote: also, look at the following (using `DateTime` 2.12): $ ~/plone/coredev/branches/4.0/bin/zopepy from DateTime import DateTime now = DateTime() now == DateTime(now) True now == DateTime(now.ISO()) False this is a _pretty_ behaviour, to say the least! :) heh, that should have read _pretty_ strange, btw... :) so, after some more reading and discussing this with Stefan, it seems the example should really use `ISO8601()` instead of `ISO()`. however, this fails as well: $ ~/plone/coredev/branches/4.0/bin/zopepy from DateTime import DateTime now = DateTime() now == DateTime(now.ISO8601()) False now.ISO8601() '2010-03-05T11:06:09+01:00' unlike stated in `DateTime.interfaces` the string returned `ISO8601` method does not contain the time zone. tres, do you have any comments on this? cheers, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 4.0 alpha released! -- http://plone.org/products/plone/ ___ 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 )
Re: [Zope-dev] Possible DateTime timezone-related regression in Zope 2.12
On 05.03.10 11:10, Andreas Zeidler wrote: now == DateTime(now.ISO8601()) False now.ISO8601() '2010-03-05T11:06:09+01:00' unlike stated in `DateTime.interfaces` the string returned `ISO8601` method does not contain the time zone. oops, it does, of course (i think i'm still a bit too tired :)). sorry about this! :) the above example fails, because `now` contains the microseconds, but `ISO8601` doesn't include them: now - DateTime(now.ISO8601()) 1.9525578703703702e-06 now, DateTime(now.ISO8601()) (DateTime('2010/03/05 11:16:9.168701 GMT+1'), DateTime('2010/03/05 11:16:09 GMT+1')) tres, do you have any comments on this? nevermind, i think now it should be clear what needs to be changed... :) cheers, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 4.0 alpha released! -- http://plone.org/products/plone/ ___ 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 )
Re: [Zope-dev] exception views lost context on Zope 2.12
On 23.02.10 13:36, Wichert Akkerman wrote: On 2/23/10 13:22 , Martin Aspeli wrote: Wichert Akkerman wrote: It is not useful, it is critical. Without the context you can not use any browser views for example. Well, the use cases that have been to date have done without it. :) I'm not disagreeing with you, I'm just saying we need to make sure we don't break existing use cases (plone.app.linkintegrity, plone.caching to name two that I know of). As I said plone.app.linkintegrity always used this trick in Zope 2.10, so it is not something I just came up with. It is known to work :) wichert is right, the existing use cases — or say, at least p.a.linkintegrity — have _not_ done without it. in fact, the confirmation view (i.e. you really wanna delete this?) relies on the (acquisition) context. otherwise it could never be rendered as something that looks like a regular page. however, the monkey patch used here is only partly applied for zope 2.12, and the bit where the view gets aq-wrapped is not[*]. since it remains to work, though, i suspect that wichert's problem could be something else... andi [*] see http://dev.plone.org/plone/browser/plone.app.linkintegrity/trunk/plone/app/linkintegrity/monkey.py#L18 -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 4.0 alpha released! -- http://plone.org/products/plone/ ___ 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-Checkins] SVN: Zope/branches/2.10/ backport support for testing against storages other than `DemoStorage` (r80357:80358) from Zope 2.11
Log message for revision 105407: backport support for testing against storages other than `DemoStorage` (r80357:80358) from Zope 2.11 Changed: U Zope/branches/2.10/doc/CHANGES.txt U Zope/branches/2.10/lib/python/Testing/custom_zodb.py -=- Modified: Zope/branches/2.10/doc/CHANGES.txt === --- Zope/branches/2.10/doc/CHANGES.txt 2009-10-31 11:04:38 UTC (rev 105406) +++ Zope/branches/2.10/doc/CHANGES.txt 2009-10-31 11:27:55 UTC (rev 105407) @@ -6,6 +6,16 @@ Zope 2.10.10 (Unreleased) +Features added + + - Testing/custom_zodb.py: added support use a different storage other +than DemoStorage. A dedicated FileStorage can be mount by setting the +$TEST_FILESTORAGE environment variable to a custom Data.fs file. A +ZEO server can be configured using the $TEST_ZEO_HOST and +$TEST_ZEO_PORT environment variables. This new functionality allows us +to use the standard Zope testrunner for writing and running tests +against existing Zope installations. + Bugs fixed - LP #360761 (backported from Acquisition trunk): fix iteration proxy Modified: Zope/branches/2.10/lib/python/Testing/custom_zodb.py === --- Zope/branches/2.10/lib/python/Testing/custom_zodb.py2009-10-31 11:04:38 UTC (rev 105406) +++ Zope/branches/2.10/lib/python/Testing/custom_zodb.py2009-10-31 11:27:55 UTC (rev 105407) @@ -1,4 +1,36 @@ + +import os +import logging import ZODB -from ZODB.DemoStorage import DemoStorage -Storage = DemoStorage(quota=(120)) +LOG = logging.getLogger('Testing') + +def getStorage(): + Return a storage instance for running ZopeTestCase based +tests. By default a DemoStorage is used. Setting +$TEST_ZEO_HOST/TEST_ZEO_PORT environment variables allows you +to use a ZEO server instead. A file storage can be configured +by settting the $TEST_FILESTORAGE environment variable. + + +get = os.environ.get + +if os.environ.has_key('TEST_ZEO_HOST') and os.environ.has_key('TEST_ZEO_PORT'): +from ZEO.ClientStorage import ClientStorage +zeo_host = get('TEST_ZEO_HOST') +zeo_port = int(get('TEST_ZEO_PORT')) +LOG.info('Using ZEO server (%s:%d)' % (zeo_host, zeo_port)) +return ClientStorage((zeo_host, zeo_port)) + +elif os.environ.has_key('TEST_FILESTORAGE'): +import ZODB.FileStorage +datafs = get('TEST_FILESTORAGE') +LOG.info('Using Filestorage at (%s)' % datafs) +return ZODB.FileStorage.FileStorage(datafs) + +else: +from ZODB.DemoStorage import DemoStorage +LOG.info('Using DemoStorage') +return DemoStorage(quota=(120)) + +Storage = getStorage() ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/src/ZPublisher/BaseRequest.py update for r104360/104361: event subscribers might still need the zodb, so `clear` must not be called before `notify` as otherwise
Log message for revision 105078: update for r104360/104361: event subscribers might still need the zodb, so `clear` must not be called before `notify` as otherwise `self._held=None` might close the connection (refs LP #414757) Changed: U Zope/branches/2.12/src/ZPublisher/BaseRequest.py -=- Modified: Zope/branches/2.12/src/ZPublisher/BaseRequest.py === --- Zope/branches/2.12/src/ZPublisher/BaseRequest.py2009-10-15 10:36:43 UTC (rev 105077) +++ Zope/branches/2.12/src/ZPublisher/BaseRequest.py2009-10-15 11:03:28 UTC (rev 105078) @@ -211,8 +211,10 @@ self._held=None def close(self): +notify(EndRequestEvent(None, self)) +# subscribers might need the zodb, so `clear` must come afterwards +# (since `self._held=None` might close the connection, see above) self.clear() -notify(EndRequestEvent(None, self)) def processInputs(self): Do any input processing that could raise errors ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/src/ZPublisher/BaseRequest.py forward-port r105078 to trunk
Log message for revision 105079: forward-port r105078 to trunk Changed: U Zope/trunk/src/ZPublisher/BaseRequest.py -=- Modified: Zope/trunk/src/ZPublisher/BaseRequest.py === --- Zope/trunk/src/ZPublisher/BaseRequest.py2009-10-15 11:03:28 UTC (rev 105078) +++ Zope/trunk/src/ZPublisher/BaseRequest.py2009-10-15 11:08:20 UTC (rev 105079) @@ -211,8 +211,10 @@ self._held=None def close(self): +notify(EndRequestEvent(None, self)) +# subscribers might need the zodb, so `clear` must come afterwards +# (since `self._held=None` might close the connection, see above) self.clear() -notify(EndRequestEvent(None, self)) def processInputs(self): Do any input processing that could raise errors ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.11/lib/python/ZPublisher/BaseRequest.py back-port r105078 to 2.11
Log message for revision 105080: back-port r105078 to 2.11 Changed: U Zope/branches/2.11/lib/python/ZPublisher/BaseRequest.py -=- Modified: Zope/branches/2.11/lib/python/ZPublisher/BaseRequest.py === --- Zope/branches/2.11/lib/python/ZPublisher/BaseRequest.py 2009-10-15 11:08:20 UTC (rev 105079) +++ Zope/branches/2.11/lib/python/ZPublisher/BaseRequest.py 2009-10-15 11:16:52 UTC (rev 105080) @@ -208,8 +208,10 @@ self._held=None def close(self): +notify(EndRequestEvent(None, self)) +# subscribers might need the zodb, so `clear` must come afterwards +# (since `self._held=None` might close the connection, see above) self.clear() -notify(EndRequestEvent(None, self)) def processInputs(self): Do any input processing that could raise errors ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/ZPublisher/BaseRequest.py back-port r105078 to 2.10
Log message for revision 105081: back-port r105078 to 2.10 Changed: U Zope/branches/2.10/lib/python/ZPublisher/BaseRequest.py -=- Modified: Zope/branches/2.10/lib/python/ZPublisher/BaseRequest.py === --- Zope/branches/2.10/lib/python/ZPublisher/BaseRequest.py 2009-10-15 11:16:52 UTC (rev 105080) +++ Zope/branches/2.10/lib/python/ZPublisher/BaseRequest.py 2009-10-15 11:17:39 UTC (rev 105081) @@ -208,8 +208,10 @@ self._held=None def close(self): +notify(EndRequestEvent(None, self)) +# subscribers might need the zodb, so `clear` must come afterwards +# (since `self._held=None` might close the connection, see above) self.clear() -notify(EndRequestEvent(None, self)) def processInputs(self): Do any input processing that could raise errors ___ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope-dev] zope.testing 3.8 fails in mysterious ways
hi, just fyi: the bug is also present in zope.testing 3.7.7 (showing up when testing plone.z3cform). would it perhaps be possible to release a fixed 3.7.8 soon, so that our buildout stops complaining again? :) cheers, andi Godefroid Chapelle wrote: Sidnei da Silva wrote: On Thu, Jul 30, 2009 at 9:33 PM, Martin Aspelioptilude+li...@gmail.com wrote: Unfortunately, I've got other packages that depend on a newer zope.testing (specifically, collective.testcaselayer). But I thought zope.testing aimed to be able to run any valid tests, so it sounds like a bug in zope.testing regardless, at least since every other test I've run in the same instance work fine. The traceback you pasted shows an UnboundLocalError. What about looking at the source and figuring out why that local variable is not defined? -- Sidnei I bumped into the same bug while working on the same package... I allowed myself to add the missing assignment. However, I'd like someone to check over my shoulder. http://mail.zope.org/pipermail/checkins/2009-July/036586.html Further, this bug is triggered by another one happening when running tests with buildout in plone.z3cform current trunk (r102411). The test runner is trying to spawn a subprocess with the --resume-layer argument. However, the --resume-layer argument is not accepted by the subprocess. This produces an error in a format not foreseen by the error parser. (which then triggered the UnboundLocalError). It would be nice if someone with a better understanding of the testrunner could take a look and understand why the --resume-layer stuff happens. Christian ? -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.3rc4 released! -- http://plone.org/products/plone/ ___ 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 2.12.0a2]Acquisition+ExtensionClass failures with Python 2.6.2/Linux
Andreas Jung wrote: In addition, some of the Acquistion test fail when trying to test the package alone: [...] Can anyone reproduce this? no, i don't see any failures with neither 2.11.1 nor 2.12.1 on a debian box (32-bit, though). andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.2.2 released! -- http://plone.org/products/plone/ ___ 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-Checkins] SVN: Zope/branches/2.11/lib/python/Acquisition/ backport r99191 to 2.11
Log message for revision 99192: backport r99191 to 2.11 Changed: U Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c U Zope/branches/2.11/lib/python/Acquisition/tests.py -=- Modified: Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c === --- Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c2009-04-15 14:36:02 UTC (rev 99191) +++ Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c2009-04-15 14:44:17 UTC (rev 99192) @@ -822,7 +822,7 @@ static PyObject * Wrapper_iter(Wrapper *self) { - return CallMethodO(OBJECT(self), py__iter__, NULL, NULL); + return PyObject_GetIter(self-obj); } static PySequenceMethods Wrapper_as_sequence = { Modified: Zope/branches/2.11/lib/python/Acquisition/tests.py === --- Zope/branches/2.11/lib/python/Acquisition/tests.py 2009-04-15 14:36:02 UTC (rev 99191) +++ Zope/branches/2.11/lib/python/Acquisition/tests.py 2009-04-15 14:44:17 UTC (rev 99192) @@ -1719,6 +1719,26 @@ iterating... [42] +Finally let's check that https://bugs.launchpad.net/zope2/+bug/360761 +has been fixed: + + class C(Acquisition.Implicit): +... l=[1,2,3] +... def __getitem__(self, i): +... return self.l[i] + + c1 = C() + type(iter(c1)) +type 'iterator' + list(c1) +[1, 2, 3] + + c2 = C().__of__(c1) + type(iter(c2)) +type 'iterator' + list(c2) +[1, 2, 3] + ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/Acquisition/ backport r99191 to 2.10
Log message for revision 99193: backport r99191 to 2.10 Changed: U Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c U Zope/branches/2.10/lib/python/Acquisition/tests.py -=- Modified: Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c === --- Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c2009-04-15 14:44:17 UTC (rev 99192) +++ Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c2009-04-15 14:44:25 UTC (rev 99193) @@ -822,7 +822,7 @@ static PyObject * Wrapper_iter(Wrapper *self) { - return CallMethodO(OBJECT(self), py__iter__, NULL, NULL); + return PyObject_GetIter(self-obj); } static PySequenceMethods Wrapper_as_sequence = { Modified: Zope/branches/2.10/lib/python/Acquisition/tests.py === --- Zope/branches/2.10/lib/python/Acquisition/tests.py 2009-04-15 14:44:17 UTC (rev 99192) +++ Zope/branches/2.10/lib/python/Acquisition/tests.py 2009-04-15 14:44:25 UTC (rev 99193) @@ -1719,6 +1719,26 @@ iterating... [42] +Finally let's check that https://bugs.launchpad.net/zope2/+bug/360761 +has been fixed: + + class C(Acquisition.Implicit): +... l=[1,2,3] +... def __getitem__(self, i): +... return self.l[i] + + c1 = C() + type(iter(c1)) +type 'iterator' + list(c1) +[1, 2, 3] + + c2 = C().__of__(c1) + type(iter(c2)) +type 'iterator' + list(c2) +[1, 2, 3] + ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope-dev] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__
Chris Withers wrote: Andreas Jung wrote: Yes, so this change introduced a bug. Who's the right person to fix it? What's the right collector to report this in? Since Acquisition is a core module of Zope: the Zope 2 tracker on Launchpad. Done: https://bugs.launchpad.net/zope2/+bug/360761 Now, who knows how to fix it? ;-) this has been fixed in http://svn.zope.org/?view=revrev=99191 cheers, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.2.1 released! -- http://plone.org/products/plone/ ___ 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] iterating over class without __iter__ but with __getitem__ raises AttributeError:__iter__
hi chris, Chris Withers wrote: Andreas Jung wrote: Yes, so this change introduced a bug. Who's the right person to fix it? What's the right collector to report this in? Since Acquisition is a core module of Zope: the Zope 2 tracker on Launchpad. Done: https://bugs.launchpad.net/zope2/+bug/360761 thanks! Now, who knows how to fix it? ;-) since i broke things, i'll try to have a look... andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.2.2 released! -- http://plone.org/products/plone/ ___ 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.globalrequest?
Roger Ineichen wrote: I see your point. I'm not saying that this is bad in general. Probably when used in moderation is the right concept for this package ;-) and it wasn't written with anything else in mind -- merely for the odd case when you need a request object, but none has been passed around. imho, it makes more sense to use a defined API in those cases instead of relying on knowledge about the current implementation. i mean, sometimes it's not possible to adjust the design and change all of the involved code (at least not timely), in which case people may resolve to simply fetch the request from anywhere they know it's accessible. a common API does help here, especially when it comes to changing things. but like i said, that's not supposed to mean `zope.globalrequest` was to promote a new pattern for zope development. cheers, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.1.5.1 released! -- http://plone.org/products/plone/ ___ 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-Checkins] SVN: Zope/trunk/ Acquisition wrappers now correctly proxy `__iter__`.
Log message for revision 94905: Acquisition wrappers now correctly proxy `__iter__`. Changed: U Zope/trunk/doc/CHANGES.txt U Zope/trunk/lib/python/Acquisition/_Acquisition.c U Zope/trunk/lib/python/Acquisition/tests.py -=- Modified: Zope/trunk/doc/CHANGES.txt === --- Zope/trunk/doc/CHANGES.txt 2009-01-21 14:44:37 UTC (rev 94904) +++ Zope/trunk/doc/CHANGES.txt 2009-01-21 16:04:11 UTC (rev 94905) @@ -237,6 +237,8 @@ Bugs Fixed + - Acquisition wrappers now correctly proxy __iter__. + - Launchpad #174705: ensure that the error info object exposed to a 'tal:on_error' handler has attributes visible to restricted code. Modified: Zope/trunk/lib/python/Acquisition/_Acquisition.c === --- Zope/trunk/lib/python/Acquisition/_Acquisition.c2009-01-21 14:44:37 UTC (rev 94904) +++ Zope/trunk/lib/python/Acquisition/_Acquisition.c2009-01-21 16:04:11 UTC (rev 94905) @@ -39,7 +39,7 @@ *py__getitem__, *py__setitem__, *py__delitem__, *py__getslice__, *py__setslice__, *py__delslice__, *py__contains__, *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__, - *py__parent__; + *py__parent__, *py__iter__; static PyObject *Acquired=0; @@ -84,6 +84,7 @@ INIT_PY_NAME(__str__); INIT_PY_NAME(__cmp__); INIT_PY_NAME(__parent__); + INIT_PY_NAME(__iter__); #undef INIT_PY_NAME } @@ -928,6 +929,12 @@ return c; } +static PyObject * +Wrapper_iter(Wrapper *self) +{ + return CallMethodO(OBJECT(self), py__iter__, NULL, NULL); +} + static PySequenceMethods Wrapper_as_sequence = { (inquiry)Wrapper_length,/*sq_length*/ (binaryfunc)Wrapper_add,/*sq_concat*/ @@ -1294,7 +1301,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)Wrapper_richcompare, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, @@ -1338,7 +1345,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)Wrapper_richcompare, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, Modified: Zope/trunk/lib/python/Acquisition/tests.py === --- Zope/trunk/lib/python/Acquisition/tests.py 2009-01-21 14:44:37 UTC (rev 94904) +++ Zope/trunk/lib/python/Acquisition/tests.py 2009-01-21 16:04:11 UTC (rev 94905) @@ -1699,6 +1699,9 @@ ... def __contains__(self, key): ... print 'contains', repr(key) ... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) The naked class behaves like this: @@ -1709,6 +1712,9 @@ 5 in c contains 5 True + list(c) +iterating... +[42] Let's put c in the context of i: @@ -1723,7 +1729,59 @@ 5 in i.c contains 5 True + list(i.c) +iterating... +[42] +Let's let's test the same again with an explicit wrapper: + + import Acquisition + class Impl(Acquisition.Explicit): +... pass + + class C(Acquisition.Explicit): +... def __getitem__(self, key): +... print 'getitem', key +... if key == 4: +... raise IndexError +... return key +... def __contains__(self, key): +... print 'contains', repr(key) +... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) + +The naked class behaves like this: + + c = C() + 3 in c +contains 3 +False + 5 in c +contains 5 +True + list(c) +iterating... +[42] + +Let's put c in the context of i: + + i = Impl() + i.c = c + +Now check that __contains__ is properly used: + + 3 in i.c # c.__of__(i) +contains 3 +False + 5 in i.c +contains 5 +True + list(i.c) +iterating... +[42] + ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.11/ backport r94905 to 2.11: Acquisition wrappers now correctly proxy `__iter__`.
Log message for revision 94906: backport r94905 to 2.11: Acquisition wrappers now correctly proxy `__iter__`. Changed: U Zope/branches/2.11/doc/CHANGES.txt U Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c U Zope/branches/2.11/lib/python/Acquisition/tests.py -=- Modified: Zope/branches/2.11/doc/CHANGES.txt === --- Zope/branches/2.11/doc/CHANGES.txt 2009-01-21 16:04:11 UTC (rev 94905) +++ Zope/branches/2.11/doc/CHANGES.txt 2009-01-21 16:25:34 UTC (rev 94906) @@ -19,6 +19,8 @@ Bugs Fixed + - Acquisition wrappers now correctly proxy __iter__. + - Products.PluginIndexes.PathIndex: backported doc fixes / optiimizations from trunk (and ExtendedPathIndex). Modified: Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c === --- Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c2009-01-21 16:04:11 UTC (rev 94905) +++ Zope/branches/2.11/lib/python/Acquisition/_Acquisition.c2009-01-21 16:25:34 UTC (rev 94906) @@ -38,7 +38,8 @@ *py__long__, *py__float__, *py__oct__, *py__hex__, *py__getitem__, *py__setitem__, *py__delitem__, *py__getslice__, *py__setslice__, *py__delslice__, *py__contains__, - *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__; + *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__, + *py__iter__; static PyObject *Acquired=0; @@ -82,6 +83,7 @@ INIT_PY_NAME(__repr__); INIT_PY_NAME(__str__); INIT_PY_NAME(__cmp__); + INIT_PY_NAME(__iter__); #undef INIT_PY_NAME } @@ -817,6 +819,12 @@ return c; } +static PyObject * +Wrapper_iter(Wrapper *self) +{ + return CallMethodO(OBJECT(self), py__iter__, NULL, NULL); +} + static PySequenceMethods Wrapper_as_sequence = { (inquiry)Wrapper_length,/*sq_length*/ (binaryfunc)Wrapper_add,/*sq_concat*/ @@ -1222,7 +1230,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)0, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, @@ -1266,7 +1274,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)0, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, Modified: Zope/branches/2.11/lib/python/Acquisition/tests.py === --- Zope/branches/2.11/lib/python/Acquisition/tests.py 2009-01-21 16:04:11 UTC (rev 94905) +++ Zope/branches/2.11/lib/python/Acquisition/tests.py 2009-01-21 16:25:34 UTC (rev 94906) @@ -1636,6 +1636,9 @@ ... def __contains__(self, key): ... print 'contains', repr(key) ... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) The naked class behaves like this: @@ -1646,6 +1649,9 @@ 5 in c contains 5 True + list(c) +iterating... +[42] Let's put c in the context of i: @@ -1660,7 +1666,59 @@ 5 in i.c contains 5 True + list(i.c) +iterating... +[42] +Let's let's test the same again with an explicit wrapper: + + import Acquisition + class Impl(Acquisition.Explicit): +... pass + + class C(Acquisition.Explicit): +... def __getitem__(self, key): +... print 'getitem', key +... if key == 4: +... raise IndexError +... return key +... def __contains__(self, key): +... print 'contains', repr(key) +... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) + +The naked class behaves like this: + + c = C() + 3 in c +contains 3 +False + 5 in c +contains 5 +True + list(c) +iterating... +[42] + +Let's put c in the context of i: + + i = Impl() + i.c = c + +Now check that __contains__ is properly used: + + 3 in i.c # c.__of__(i) +contains 3 +False + 5 in i.c +contains 5 +True + list(i.c) +iterating... +[42] + ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/ backport r94905 to 2.10: Acquisition wrappers now correctly proxy `__iter__`.
Log message for revision 94907: backport r94905 to 2.10: Acquisition wrappers now correctly proxy `__iter__`. Changed: U Zope/branches/2.10/doc/CHANGES.txt U Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c U Zope/branches/2.10/lib/python/Acquisition/tests.py -=- Modified: Zope/branches/2.10/doc/CHANGES.txt === --- Zope/branches/2.10/doc/CHANGES.txt 2009-01-21 16:25:34 UTC (rev 94906) +++ Zope/branches/2.10/doc/CHANGES.txt 2009-01-21 16:26:38 UTC (rev 94907) @@ -19,6 +19,8 @@ Bugs fixed + - Acquisition wrappers now correctly proxy __iter__. + - Products.PluginIndexes.PathIndex: backported doc fixes / optiimizations from trunk (and ExtendedPathIndex). Modified: Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c === --- Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c2009-01-21 16:25:34 UTC (rev 94906) +++ Zope/branches/2.10/lib/python/Acquisition/_Acquisition.c2009-01-21 16:26:38 UTC (rev 94907) @@ -38,7 +38,8 @@ *py__long__, *py__float__, *py__oct__, *py__hex__, *py__getitem__, *py__setitem__, *py__delitem__, *py__getslice__, *py__setslice__, *py__delslice__, *py__contains__, - *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__; + *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__, + *py__iter__; static PyObject *Acquired=0; @@ -82,7 +83,8 @@ INIT_PY_NAME(__repr__); INIT_PY_NAME(__str__); INIT_PY_NAME(__cmp__); - + INIT_PY_NAME(__iter__); + #undef INIT_PY_NAME } @@ -817,6 +819,12 @@ return c; } +static PyObject * +Wrapper_iter(Wrapper *self) +{ + return CallMethodO(OBJECT(self), py__iter__, NULL, NULL); +} + static PySequenceMethods Wrapper_as_sequence = { (inquiry)Wrapper_length,/*sq_length*/ (binaryfunc)Wrapper_add,/*sq_concat*/ @@ -1222,7 +1230,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)0, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, @@ -1266,7 +1274,7 @@ /* tp_clear */ (inquiry)Wrapper_clear, /* tp_richcompare*/ (richcmpfunc)0, /* tp_weaklistoffset */ (long)0, - /* tp_iter */ (getiterfunc)0, + (getiterfunc)Wrapper_iter, /*tp_iter*/ /* tp_iternext */ (iternextfunc)0, /* tp_methods*/ Wrapper_methods, /* tp_members*/ 0, Modified: Zope/branches/2.10/lib/python/Acquisition/tests.py === --- Zope/branches/2.10/lib/python/Acquisition/tests.py 2009-01-21 16:25:34 UTC (rev 94906) +++ Zope/branches/2.10/lib/python/Acquisition/tests.py 2009-01-21 16:26:38 UTC (rev 94907) @@ -1636,6 +1636,9 @@ ... def __contains__(self, key): ... print 'contains', repr(key) ... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) The naked class behaves like this: @@ -1646,6 +1649,9 @@ 5 in c contains 5 True + list(c) +iterating... +[42] Let's put c in the context of i: @@ -1660,7 +1666,59 @@ 5 in i.c contains 5 True + list(i.c) +iterating... +[42] +Let's let's test the same again with an explicit wrapper: + + import Acquisition + class Impl(Acquisition.Explicit): +... pass + + class C(Acquisition.Explicit): +... def __getitem__(self, key): +... print 'getitem', key +... if key == 4: +... raise IndexError +... return key +... def __contains__(self, key): +... print 'contains', repr(key) +... return key == 5 +... def __iter__(self): +... print 'iterating...' +... return iter((42,)) + +The naked class behaves like this: + + c = C() + 3 in c +contains 3 +False + 5 in c +contains 5 +True + list(c) +iterating... +[42] + +Let's put c in the context of i: + + i = Impl() + i.c = c + +Now check that __contains__ is properly used: + + 3 in i.c # c.__of__(i) +contains 3 +False + 5 in i.c +contains 5 +True + list(i.c) +iterating... +[42] + ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
Re: [Zope-dev] zope.globalrequest?
Roger Ineichen wrote: I don't say that this is bad in general. I just say that if you build an application based on zope.globalrequest, this is a totaly different base concept how you will develop applications like we do now. And you have to pay the price with a complex test setup. it's merely one more package and its zcml (setting up two event subscribers). considering the complexity of the stack as we know it i don't think it really adds that much, no? best regards, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.1.7 released! -- http://plone.org/products/plone/ ___ 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.globalrequest?
Stephan Richter wrote: Then let's just mention its intended use in Zope 2/Plone in the documentation and go on with life. i've just added such a note and made a fresh release — http://pypi.python.org/pypi/zope.globalrequest/1.0a2 best regards, andi -- zeidler it consulting - http://zitc.de/ - i...@zitc.de friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.1.7 released! -- http://plone.org/products/plone/ ___ 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] Re: Zope2 monitoring
Hanno Schlichting wrote: Nice. We are already using supervisord for this project. Even more off-topic that's why we added the new 'console' command to the zopectl-like script in the zope2instance recipe, to have Zope running in fg mode without the forced automatic development mode. yay, finally! :) andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.1rc1 released! -- http://plone.org/products/plone/ ___ 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] Re: Proposal: Merge philikon-aq branch into Zope trunk
Christian Theune wrote: On Thu, Apr 17, 2008 at 12:43:25PM +0200, Martijn Pieters wrote: On Thu, Apr 17, 2008 at 12:27 PM, Hanno Schlichting [EMAIL PROTECTED] wrote: I would like to do the merge as soon as possible, so people can easily test it against all their applications and report back problems. Merging it into Zope trunk will get it into the Zope 2.12 release which is at this point not scheduled yet, but is unlikely to get a release before early 2009. This should give us plenty of time to test. Opinions, votes? +sys.maxint! Darn. My +1 won't fit in there anymore! perhaps martijn's still on 32-bit? :) anyway, +1 from me as well. andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ plone 3.1rc1 released! -- http://plone.org/products/plone/ ___ 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-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ this branch is closed as the changes necessary for blob integration are now done via a monkey patch (so that official zope releases can be used)
Log message for revision 83153: this branch is closed as the changes necessary for blob integration are now done via a monkey patch (so that official zope releases can be used) Changed: D Zope/branches/2.10-with-ZODB3.8/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch-zope2.11-with-standard-docutils/ this branch is closed as it was superseded by 'philikon-zope2.11-with-standard-docutils'
Log message for revision 83154: this branch is closed as it was superseded by 'philikon-zope2.11-with-standard-docutils' Changed: D Zope/branches/witsch-zope2.11-with-standard-docutils/ -=- ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ Merged revisions 80850-81880 via svnmerge from
Log message for revision 81881: Merged revisions 80850-81880 via svnmerge from svn+ssh://svn.zope.org/repos/main/Zope/branches/2.10 r80942 | andreasjung | 2007-10-20 13:33:36 +0200 (Sat, 20 Oct 2007) | 4 lines - Collector #151020: HTTP_CHAR_SET headers containing 'x-user-defined' caused a LookupError exception. Unknown encodings are from now on silently discarded. r80944 | andreasjung | 2007-10-20 13:37:27 +0200 (Sat, 20 Oct 2007) | 2 lines collector - Launchpad r81167 | hannosch | 2007-10-28 10:40:32 +0100 (Sun, 28 Oct 2007) | 2 lines Backported discouraged warning for manage_* events from trunk r81176 | andreasjung | 2007-10-29 14:08:34 +0100 (Mon, 29 Oct 2007) | 2 lines preparing 2.10.5 r81816 | wichert | 2007-11-13 10:20:30 +0100 (Tue, 13 Nov 2007) | 1 line Base the default location of softwarehome on Zope2, which is guaranteed not to be a namespace but always located inside the Zope2 software home. This fixes Zope2 breaking on systems which uses namespace packages for Products.* Changed: _U Zope/branches/2.10-with-ZODB3.8/ U Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt U Zope/branches/2.10-with-ZODB3.8/inst/WinBuilders/mk/zope.mk U Zope/branches/2.10-with-ZODB3.8/inst/versions.py U Zope/branches/2.10-with-ZODB3.8/lib/python/App/FindHomes.py U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/CopySupport.py U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/subscribers.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/PageTemplates/unicodeconflictresolver.py -=- Property changes on: Zope/branches/2.10-with-ZODB3.8 ___ Name: svnmerge-integrated - /Zope/branches/2.10:1-80849 + /Zope/branches/2.10:1-81880 Modified: Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt === --- Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-11-16 12:31:03 UTC (rev 81880) +++ Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-11-16 12:34:29 UTC (rev 81881) @@ -8,8 +8,15 @@ - Backported feature from Zope 2.11 to support named temporary files. - Zope 2.10.5 (unreleased) + Zope 2.10.5 (2007/10/30) +Other changes + + - Turned deprecation warnings for manage_afterAdd, manage_beforeDelete +and manage_afterClone methods into discouraged warnings. These methods +will not be removed in Zope 2.11, but stay for the foreseeable future. +Using events is still highly encouraged. + Bugs fixed - Launchpad #147201: treat container-class in zope.conf as a string, @@ -33,6 +40,10 @@ - Collector #2339: ZPT: fixed unicode issue when using the 'structure' directive + - Launchpad #151020: HTTP_CHAR_SET headers containing 'x-user-defined' +caused a LookupError exception. Unknown encodings are from now on +silently discarded. + Zope 2.10.4 (2007/06/23) Other changes Modified: Zope/branches/2.10-with-ZODB3.8/inst/WinBuilders/mk/zope.mk === --- Zope/branches/2.10-with-ZODB3.8/inst/WinBuilders/mk/zope.mk 2007-11-16 12:31:03 UTC (rev 81880) +++ Zope/branches/2.10-with-ZODB3.8/inst/WinBuilders/mk/zope.mk 2007-11-16 12:34:29 UTC (rev 81881) @@ -1,4 +1,4 @@ -ZOPEVERSION = 2.10.4-final +ZOPEVERSION = 2.10.5-final ZOPEDIRNAME := Zope-$(ZOPEVERSION) ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz Modified: Zope/branches/2.10-with-ZODB3.8/inst/versions.py === --- Zope/branches/2.10-with-ZODB3.8/inst/versions.py2007-11-16 12:31:03 UTC (rev 81880) +++ Zope/branches/2.10-with-ZODB3.8/inst/versions.py2007-11-16 12:34:29 UTC (rev 81881) @@ -1,5 +1,5 @@ ZOPE_MAJOR_VERSION = '2.10' -ZOPE_MINOR_VERSION = '4' +ZOPE_MINOR_VERSION = '5' ZOPE_BRANCH_NAME= '$Name$'[6:] or 'no-branch' # always start prerelease branches with '0' to avoid upgrade Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/App/FindHomes.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/App/FindHomes.py 2007-11-16 12:31:03 UTC (rev 81880) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/App/FindHomes.py 2007-11-16 12:34:29 UTC (rev 81881) @@ -26,7 +26,8 @@ try: home = os.environ['SOFTWARE_HOME'] except KeyError: -home = os.path.abspath(package_home(Products.__dict__)) +import Zope2 +home = os.path.abspath(package_home(Zope2.__dict__)) home, e = os.path.split(home) d, e = os.path.split(home) Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/CopySupport.py
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ Initialized merge tracking via svnmerge with revisions 1-80849 from
Log message for revision 81880: Initialized merge tracking via svnmerge with revisions 1-80849 from svn+ssh://svn.zope.org/repos/main/Zope/branches/2.10 Changed: _U Zope/branches/2.10-with-ZODB3.8/ -=- Property changes on: Zope/branches/2.10-with-ZODB3.8 ___ Name: svnmerge-integrated + /Zope/branches/2.10:1-80849 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ merged r78106:80849 from the zope 2.10 branch
Log message for revision 80851: merged r78106:80849 from the zope 2.10 branch Changed: U Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt U Zope/branches/2.10-with-ZODB3.8/lib/python/App/dtml/manage_page_style.css.dtml U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Application.py U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Traversable.py U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/tests/testApplication.py U Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/tests/testTraverse.py _U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/ U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/PageTemplates/Expressions.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/PageTemplates/ZopePageTemplate.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/Sessions/SessionDataManager.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Products/__init__.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Testing/ZopeTestCase/ZopeLite.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Testing/ZopeTestCase/testBaseTestCase.py U Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/HTTPRequest.py U Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/tests/testHTTPRequest.py U Zope/branches/2.10-with-ZODB3.8/lib/python/ZServer/FCGIServer.py U Zope/branches/2.10-with-ZODB3.8/lib/python/Zope2/Startup/zopeschema.xml -=- Modified: Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt === --- Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-10-11 15:12:04 UTC (rev 80850) +++ Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-10-11 15:33:54 UTC (rev 80851) @@ -8,14 +8,41 @@ - Backported feature from Zope 2.11 to support named temporary files. - Zope 2.10.4 (23.06.2007) + Zope 2.10.5 (unreleased) +Bugs fixed + + - Launchpad #147201: treat container-class in zope.conf as a string, +making it possible to use types from extra products directories. + + - Collector #2358: backported fix making 'Products' package a real +namespace package from the trunk. + + - Collector #2287: form ':record' objects did not implement enough of +the mapping interface. + + - Collector #2352: fix in OFS.Traversable + + - Collector #2346: username logging in FCGI crashed the server + + - ZopePageTemplate's pt_edit did not recognize content type arguments +which had a charset information included. + + - Collector #2332: SessionDataManger: don't swallow ConflictErrors + + - Collector #2339: ZPT: fixed unicode issue when using the 'structure' +directive + + Zope 2.10.4 (2007/06/23) + Other changes - updated to ZODB 3.7.1 - updated to Zope 3.3.2 + - updated to Five 1.5.5 + Bugs fixed - Collector #1306: Missing acquisition context on local roles screen. Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/App/dtml/manage_page_style.css.dtml === --- Zope/branches/2.10-with-ZODB3.8/lib/python/App/dtml/manage_page_style.css.dtml 2007-10-11 15:12:04 UTC (rev 80850) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/App/dtml/manage_page_style.css.dtml 2007-10-11 15:33:54 UTC (rev 80851) @@ -44,6 +44,10 @@ color: #99; } +a img { + border: 0; +} + p { font-family: Verdana, Helvetica, sans-serif; font-size: 10pt; Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Application.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Application.py 2007-10-11 15:12:04 UTC (rev 80850) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Application.py 2007-10-11 15:33:54 UTC (rev 80851) @@ -634,9 +634,10 @@ folder_permissions, raise_exc=debug_mode) # Delayed install of packages-as-products -for module, init_func in Products._packages_to_initialize: +for module, init_func in getattr(Products, '_packages_to_initialize', []): install_package(app, module, init_func, raise_exc=debug_mode) -Products._packages_to_initialize = [] +if hasattr(Products, '_packages_to_initialize'): +del Products._packages_to_initialize Products.meta_types=Products.meta_types+tuple(meta_types) InitializeClass(Folder.Folder) Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Traversable.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Traversable.py 2007-10-11 15:12:04 UTC (rev 80850) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/OFS/Traversable.py 2007-10-11 15:33:54 UTC (rev 80851) @@ -186,18 +186,18 @@ bobo_traverse = getattr(obj,
[Zope-dev] vulnerability in zope 2.10.4
hi, imho i've found a vulnerability in zope 2.10.4 or rather in the newer version of five (1.5.5) used by it. in `Five/browser/ pagetemplatefile.py` in line 27 `createTrustedZopeEngine` is used the instantiate the page template engine used by five templates, or at least this is what i think it does. the problem with this is that `trustedBoboAwareZopeTraverse` (in `PageTemplates/Expressions.py`) gets used to traverse path-expressions using `unrestrictedTraverse` (line 100), which means that i can access say the title of an otherwise private object with a simple obj/Title. i ran into this when one of my doctests[1] failed after upgrading from zope 2.10.3 to 2.10.4, because it could now access the title, even though permissions are explicitly set up beforehand to prevent this. using `createZopeEngine` instead of `createTrustedZopeEngine` didn't help with the test, unfortunately, since this would then raise an `Unauthorized` right away when rendering the `folder_contents` view. however, if i defer resetting the roles of the test user to just before the click on 'Delete' (line 35 in the test), the test works again... i've also just verified this ttw by creating a simple five view and a file object. i can successfully access the title attribute using the view, even though view and access contents information permissions are set up so only the manager role can access the object. dropping in zope 2.10.3 things work as expected, that is an `Unauthorized` exception is raised. so, unless i'm completely wrong here, i'd say this is a pretty serious security whole, no? cheers, andi [1] http://dev.plone.org/plone/browser/plone.app.linkintegrity/trunk/ plone/app/linkintegrity/docs/testReferalToPrivateFiles.txt?rev=16003 -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: vulnerability in zope 2.10.4
On Jul 12, 2007, at 12:48 AM, Andreas Zeidler wrote: so, unless i'm completely wrong here, i'd say this is a pretty serious security whole, no? that should have been a hole, actually... too late already, sorry! :) andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: vulnerability in zope 2.10.4
On Jul 12, 2007, at 2:50 AM, Tres Seaver wrote: so, unless i'm completely wrong here, i'd say this is a pretty serious security whole, no? No. It has been an accident that, until just recently, the filesystem-based templates in a Five view were running as untrusted code. yep, martin's already told me the same on irc, along with the history of your fix. but thanks for the quick answer... So, for instance, it is possible for the author of the view class to write methods which exposed private attributes to the view's template, for instance (and has beenn since before Five was added to Zope). i know that, of course, but was assuming that rendering five views as untrusted code was intentional, especially since templates registered for * could potentially be pretty harmful. plus i wasn't expecting an imho significant change like that to happen in a bugfix release. but anyway, thanks for clarifying! :) andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 29, 2007, at 11:16 PM, Philipp von Weitershausen wrote: If I know Andreas he won't do ZODB releases... So, apart from updating version.txt, CHANGES.txt, etc. and making a tag, I don't think there would be much else to a ZODB release... *wink* :) hmm, i'm not sure if i should do any zodb releases, if that's what you're hinting at. i mean, i haven't been involved in zodb development at all and i've got way too little knowledge about zodb anyway -- especially of what's been going on in those branches recently... so imho it doesn't seem appropriate. as for andreas, you're right. i just saw that he had created the 3.6.2 tag and was therefore assuming he's been doing zodb releases as well, but in fact this was just one out of two tags he's done so far. my mistake... :) cheers, andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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-Checkins] SVN: Zope/branches/witsch-2.10-with-passing-zclasses-tests/ created branch of zope 2.10 using the zodb 3.7 branch with the fix for the zclasses tests
Log message for revision 77176: created branch of zope 2.10 using the zodb 3.7 branch with the fix for the zclasses tests Changed: A Zope/branches/witsch-2.10-with-passing-zclasses-tests/ -=- Copied: Zope/branches/witsch-2.10-with-passing-zclasses-tests (from rev 77175, Zope/branches/2.10) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch-2.10-with-passing-zclasses-tests/lib/python/ changed externals to use the zodb 3.7 branch
Log message for revision 77177: changed externals to use the zodb 3.7 branch Changed: _U Zope/branches/witsch-2.10-with-passing-zclasses-tests/lib/python/ -=- Property changes on: Zope/branches/witsch-2.10-with-passing-zclasses-tests/lib/python ___ Name: svn:externals - BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transaction svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zodbcode + BTrees svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zodbcode ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch-2.9-with-passing-zclasses-tests/ created branch of zope 2.9 using the zodb 3.6 branch with the fix for the zclasses tests
Log message for revision 77179: created branch of zope 2.9 using the zodb 3.6 branch with the fix for the zclasses tests Changed: A Zope/branches/witsch-2.9-with-passing-zclasses-tests/ -=- Copied: Zope/branches/witsch-2.9-with-passing-zclasses-tests (from rev 77178, Zope/branches/2.9) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] Re: State of 'Zope211-3.4-integration' branch
On Jun 25, 2007, at 10:05 AM, Philipp von Weitershausen wrote: On 21 Jun 2007, at 23:47 , Andreas Zeidler wrote: On Jun 21, 2007, at 9:07 PM, Tres Seaver wrote: ah, here it is: http://svn.zope.org/?rev=76408view=rev should fix the zclasses problem, if i'm not totally mistaken. That change needs backporting, I think, to the ZODB 3.6 line (for 2.9) and 3.7 line (for 2.10). true, but i think philipp was only asking about 2.11 for the time being. i agree the fix should be backported, though. i'd even volunteer to do it, if nobody else wants to... :) That would be great, especially since we're on the verge of new maintenance releases for 2.9 and 2.10. i did the backporting of jim's fix[1] to the 3.6 and 3.7 branches of zodb this morning and created two branches[2,3] of zope 2.9 and 2.10 with no further changes except the updated externals (pointing at the zodb branches, of course). all tests are passing, that is for the zodb branches as well as for both zope branches, and especially for zclasses, run individually and together with all other tests. so i reckon the fix could go into the next releases of 2.9 and 2.10, provided they are using new releases of zodb 3.6 and 3.7 in turn. plenty of work for andreas, i guess... :) ah, one note: just make sure you don't check out the below branches [2,3] under their original name. a regex bug in zope.configuration will give you failures caused by wrong include paths when the path of the checkout contains the string tests... cheers, andi [1] http://svn.zope.org/?rev=76408view=rev [2] svn://svn.zope.org/repos/main/Zope/branches/witsch-2.9-with- passing-zclasses-tests [3] svn://svn.zope.org/repos/main/Zope/branches/witsch-2.10-with- passing-zclasses-tests -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 25, 2007, at 10:05 AM, Philipp von Weitershausen wrote: true, but i think philipp was only asking about 2.11 for the time being. i agree the fix should be backported, though. i'd even volunteer to do it, if nobody else wants to... :) That would be great, especially since we're on the verge of new maintenance releases for 2.9 and 2.10. when are they due? unfortunately i won't be able to do the backporting before thursday, since we've got a project release on wednesday... andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 25, 2007, at 12:09 PM, Andreas Jung wrote: On Jun 25, 2007, at 10:05 AM, Philipp von Weitershausen wrote: That would be great, especially since we're on the verge of new maintenance releases for 2.9 and 2.10. when are they due? unfortunately i won't be able to do the backporting before thursday, since we've got a project release on wednesday... I defer the 2.9/2.10 for some days until I know how we should deal with the current state of the Zope 3.2/3.3 branches. that sounds like the release aren't likely to happen before friday, which will leave enough time for me to do the backporting after our release... thanks. :) andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 25, 2007, at 6:24 PM, Andreas Jung wrote: Back to the original subject...any objections to merge this 2.11 integration branch back on the trunk *with* failing ZClasses tests. hmm, maybe you lost me somewhere, but aren't we talking about your svn://svn.zope.org/repos/main/Zope/branches/Zope211-3.4-integration branch? like i said before, the ZClasses test do not fail on that branch, neither alone nor when run with all other tests. well, at least not for me, but maybe i'm missing something here? cheers, andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 25, 2007, at 10:48 PM, Tres Seaver wrote: Andreas Jung wrote: --On 25. Juni 2007 12:56:08 -0400 Tres Seaver [EMAIL PROTECTED] wrote: Shouldn't the Zope2 trunk be using ZODB 3.8 at this point? And won't we therefore get Jim's fix? The 2.11 integration branch also uses ZODB 3.8. So merging this branch would bring the Zope 2 trunk together with Zope 3.4 and ZODB 3.8. Then are the ZClasses tests failing when run standaone on that branch? E.g.:: $ /path/to/python2.4 test.py -s ZClasses no, they are not. :) andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 20, 2007, at 1:48 PM, Philipp von Weitershausen wrote: Btw, if I interpret http://svn.zope.org/?rev=76390view=rev correctly, it sounds like Tres has found a solution to that ZClass bug. We just need to propogate the patch to Zope 3.3/2.10 and trunk/ trunk. Right, Tres? What I fixed was the unique-to-2.9 breakage due to the fact that 'Implements' objects couldn't be pickled. The 2.9 ZClass tests now fail in exactly the same way as the 2.10 / trunk tests. Ah. What a relief :) :) apart from that i think jim fixed the zclasses problem on the last day of the sprint, at least he told me so. could be i misunderstood something, but actually i'm quite sure, since he also told me how he did it and that made a lot of sense after having looked at the problem for a couple hours before... :) ah, here it is: http://svn.zope.org/?rev=76408view=rev should fix the zclasses problem, if i'm not totally mistaken. and btw, andreas' branch[1] produces no test failures for me (at r76878) anyway, so imho we're good to go! :) cheers, andi [1] svn+ssh://svn.zope.org/repos/main/Zope/branches/Zope211-3.4- integration -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 21, 2007, at 10:35 AM, Andreas Zeidler wrote: and btw, andreas' branch[1] produces no test failures for me (at r76878) anyway, so imho we're good to go! :) and just fyi, the 2.10 branch[1] using zodb 3.8 also has no failures... (i still need to merge in recent changes from the regular 2.10 branch, though). andi [1] svn://svn.zope.org/repos/main/Zope/branches/2.10-with-ZODB3.8 -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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] Re: State of 'Zope211-3.4-integration' branch
On Jun 21, 2007, at 9:07 PM, Tres Seaver wrote: ah, here it is: http://svn.zope.org/?rev=76408view=rev should fix the zclasses problem, if i'm not totally mistaken. That change needs backporting, I think, to the ZODB 3.6 line (for 2.9) and 3.7 line (for 2.10). true, but i think philipp was only asking about 2.11 for the time being. i agree the fix should be backported, though. i'd even volunteer to do it, if nobody else wants to... :) and btw, andreas' branch[1] produces no test failures for me (at r76878) anyway, so imho we're good to go! :) Is that running only the ZClass tests? Because none of those were failing when running all tests. i know, but that's only true for the regular 2.9 and 2.10 branches; on both andreas' (for trunk) and my (for 2.10) zodb 3.8 integration branches the zclasses tests would fail both when run separately as well as with all other tests. imho that funny effect that they wouldn't fail when running all tests went away with zodb 3.8. afaik it's even the same on theuni's branch for 2.9. but to answer the question: with jim's fix the zclasses tests run, separately and with all others, on the 2.11 and 2.10 branches (i haven't check theuni's). andi -- zeidler it consulting - http://zitc.de/ - [EMAIL PROTECTED] friedelstraße 31 - 12047 berlin - telefon +49 30 25563779 pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/ sprint with us! - http://plone.org/events/sprints/potsdam-sprint-2007 PGP.sig Description: This is a digitally signed message part ___ 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-Checkins] SVN: Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/i18n.zcml fix to help run the tests with the eggified zope2
Log message for revision 76316: fix to help run the tests with the eggified zope2 Changed: U Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/i18n.zcml -=- Modified: Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/i18n.zcml === --- Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/i18n.zcml 2007-06-04 16:07:20 UTC (rev 76315) +++ Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/i18n.zcml 2007-06-04 16:10:18 UTC (rev 76316) @@ -20,8 +20,8 @@ factory=zope.publisher.http.HTTPCharsets / - configure package=zope.app -i18n:registerTranslations directory=locales/ + configure package=zope.app.locales +i18n:registerTranslations directory=./ /configure /configure ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9-with-ZODB3.8/setup.py the `winlock.c` extension no longer exists with zodb 3.8
Log message for revision 76329: the `winlock.c` extension no longer exists with zodb 3.8 Changed: U Zope/branches/2.9-with-ZODB3.8/setup.py -=- Modified: Zope/branches/2.9-with-ZODB3.8/setup.py === --- Zope/branches/2.9-with-ZODB3.8/setup.py 2007-06-04 18:05:28 UTC (rev 76328) +++ Zope/branches/2.9-with-ZODB3.8/setup.py 2007-06-04 20:09:03 UTC (rev 76329) @@ -476,15 +476,9 @@ sources= ['persistent/TimeStamp.c'] ) -winlock = Extension(name = 'ZODB.winlock', -include_dirs = include, -sources = ['ZODB/winlock.c'] -) - ext_modules += [cPersistence, cPickleCache, TimeStamp, - winlock, ] # We're using the module docstring as the distutils descriptions. ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9-with-ZODB3.8/lib/python/Products/Transience/tests/testCounters.py DB.open() doesn't support the `synch` parameter in ZODB 3.8, so this test doesn't make sense a
Log message for revision 76330: DB.open() doesn't support the `synch` parameter in ZODB 3.8, so this test doesn't make sense anymore (and can be removed) Changed: D Zope/branches/2.9-with-ZODB3.8/lib/python/Products/Transience/tests/testCounters.py -=- Deleted: Zope/branches/2.9-with-ZODB3.8/lib/python/Products/Transience/tests/testCounters.py === --- Zope/branches/2.9-with-ZODB3.8/lib/python/Products/Transience/tests/testCounters.py 2007-06-04 20:09:03 UTC (rev 76329) +++ Zope/branches/2.9-with-ZODB3.8/lib/python/Products/Transience/tests/testCounters.py 2007-06-04 20:10:15 UTC (rev 76330) @@ -1,105 +0,0 @@ -## -# -# Copyright (c) 2001, 2002 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE -# -## - -import os -from unittest import TestCase, TestSuite, makeSuite -from ZODB.POSException import ConflictError -from ZODB.FileStorage import FileStorage -from ZODB.DB import DB -import transaction - -from Products.Transience.Transience import Length2, Increaser - -# Test pattern is copied from BTrees/tests/testConflict.py - -class Base(TestCase): -storage = None - -def setUp(self): -pass - -def tearDown(self): -transaction.abort() -if self.storage is not None: -self.storage.close() -self.storage.cleanup() - -def openDB(self): -n = 'fs_tmp__%s' % os.getpid() -self.storage = FileStorage(n) -self.db = DB(self.storage) - -class TestLength2(Base): - -def testConflict(self): -# Set up database connections to provoke conflict. -self.openDB() -length = Length2(0) - -r1 = self.db.open().root() -r1['ob'] = length -transaction.commit() - -r2 = self.db.open(synch=False).root() -copy = r2['ob'] -# The following ensures that copy is loaded. -self.assertEqual(copy(),0) - -# First transaction. -length.increment(10) -length.decrement(1) -transaction.commit() - -# Second transaction. -length = copy -length.increment(20) -length.decrement(2) -transaction.commit() - -self.assertEqual(length(), 10+20-max(1,2)) - -class TestIncreaser(Base): - -def testConflict(self): - -# Set up database connections to provoke conflict. -self.openDB() -increaser = Increaser(0) - -r1 = self.db.open().root() -r1['ob'] = increaser -transaction.commit() - -r2 = self.db.open(synch=False).root() -copy = r2['ob'] -# The following ensures that copy is loaded. -self.assertEqual(copy(),0) - -# First transaction. -increaser.set(10) -transaction.commit() - - -# Second transaction. -increaser = copy -increaser.set(20) -transaction.commit() - -self.assertEqual(increaser(), 20) - -def test_suite(): -suite = TestSuite() -suite.addTest(makeSuite(TestLength2)) -suite.addTest(makeSuite(TestIncreaser)) -return suite ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.9-with-ZODB3.8/lib/python/zope/ updated externals, after zope.proxy was moved in r75161
Log message for revision 76332: updated externals, after zope.proxy was moved in r75161 Changed: _U Zope/branches/2.9-with-ZODB3.8/lib/python/zope/ -=- Property changes on: Zope/branches/2.9-with-ZODB3.8/lib/python/zope ___ Name: svn:externals - cachedescriptors svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/cachedescriptors component svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/component configuration svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/configuration documenttemplate svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/documenttemplate event svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/event exceptions svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/exceptions hookable svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/hookable i18n svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/i18n i18nmessageid svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/i18nmessageid interface svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/interface modulealias svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/modulealias pagetemplate svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/pagetemplate proxy svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy publisher svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/publisher schemasvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/schema security svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/security serversvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/server structuredtext svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/structuredtext tal svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/tal tales svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/tales threadsvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/thread deprecation svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/deprecation dottedname svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/dottedname formlib svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/formlib index svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/index testbrowser svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/testbrowser testing svn://svn.zope.org/repos/main/zope.testing/tags/3.0/src/zope/testing contentprovider svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/contentprovider viewlet svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/viewlet + cachedescriptors svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/cachedescriptors component svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/component configuration svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/configuration documenttemplate svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/documenttemplate event svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/event exceptions svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/exceptions hookable svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/hookable i18n svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/i18n i18nmessageid svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/i18nmessageid interface svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/interface modulealias svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/modulealias pagetemplate svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/pagetemplate proxy svn://svn.zope.org/repos/main/zope.proxy/trunk/src/zope/proxy publisher svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/publisher schemasvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/schema security svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/security serversvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/server structuredtext svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/structuredtext tal svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/tal tales svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/tales threadsvn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/thread deprecation svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/deprecation dottedname svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/dottedname formlib svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/formlib index svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/index testbrowser svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/zope/testbrowser testing
[Zope-Checkins] SVN: Zope/branches/2.9-with-ZODB3.8/lib/python/ updated externals, after zodbcode was moved in r76244
Log message for revision 76333: updated externals, after zodbcode was moved in r76244 Changed: _U Zope/branches/2.9-with-ZODB3.8/lib/python/ -=- Property changes on: Zope/branches/2.9-with-ZODB3.8/lib/python ___ Name: svn:externals - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo # Todo: tag zdaemon zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/pytz zodbcode svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode ClientCookie svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/ClientCookie mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/mechanize + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo # Todo: tag zdaemon zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/pytz zodbcode svn://svn.zope.org/repos/main/zodbcode/trunk/src/zodbcode ClientCookie svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/ClientCookie mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.2.2/src/mechanize ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch-2.10-with-standard-docutils/ branch not using a customized flavour of docutils, but a monkey patch addressing the security issues instead; this makes it poss
Log message for revision 76341: branch not using a customized flavour of docutils, but a monkey patch addressing the security issues instead; this makes it possible to use the regular docutils egg when eggifying zope2... Changed: A Zope/branches/witsch-2.10-with-standard-docutils/ -=- Copied: Zope/branches/witsch-2.10-with-standard-docutils (from rev 76340, Zope/trunk) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch- it was branched from trunk, of course...
Log message for revision 76342: it was branched from trunk, of course... Changed: D Zope/branches/witsch-2.10-with-standard-docutils/ A Zope/branches/witsch-zope2.11-with-standard-docutils/ -=- Copied: Zope/branches/witsch-zope2.11-with-standard-docutils (from rev 76341, Zope/branches/witsch-2.10-with-standard-docutils) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/ docutil's security restrictions are now applied using a monkey patch; this way the upstream version of docutils c
Log message for revision 76343: docutil's security restrictions are now applied using a monkey patch; this way the upstream version of docutils can be used (i.e. an egg) Changed: _U Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/ A Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/docutilsSecurityPatches/ A Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/docutilsSecurityPatches/__init__.py U Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/reStructuredText/__init__.py -=- Property changes on: Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python ___ Name: svn:externals - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees persistent -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent ThreadedAsync -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync transaction-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO ZODB -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB ZopeUndo -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz zodbcode -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode mechanize -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm RestrictedPython svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.0/src/RestrictedPython + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 BTrees -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees persistent -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent ThreadedAsync -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync transaction-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO ZODB -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB ZopeUndo -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon pytz -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz zodbcode -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode mechanize -r 69031 svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0 ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm RestrictedPython svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.0/src/RestrictedPython Added: Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/docutilsSecurityPatches/__init__.py === --- Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/docutilsSecurityPatches/__init__.py (rev 0) +++ Zope/branches/witsch-zope2.11-with-standard-docutils/lib/python/docutilsSecurityPatches/__init__.py 2007-06-04 23:26:53 UTC (rev 76343) @@ -0,0 +1,53 @@ +## +# +# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE +# +## + security patches for docutils + +try: +import docutils +except ImportError: +raise ImportError, 'Please install docutils 0.4.0+ from http://docutils.sourceforge.net/#download.' + +version = docutils.__version__.split('.') +if not (version = ['0', '4', '0'] or version = ['0', '4']): +raise ImportError, Old version of docutils found: +Got: %(version)s, required: 0.4.0+ +Please remove docutils from %(path)s and replace it with a new version. You +can download docutils at http://docutils.sourceforge.net/#download. + % {'version' : docutils.__version__, 'path' : docutils.__path__[0] } + + +# disable inclusion of
[Zope-Checkins] SVN: Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/form/tests/forms.txt another fix help with the tests of the eggified zope2: the status: header now read OK inst
Log message for revision 76345: another fix help with the tests of the eggified zope2: the status: header now read OK instead of Ok, and since 200 is distinct enough the ... should be okay Changed: U Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/form/tests/forms.txt -=- Modified: Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/form/tests/forms.txt === --- Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/form/tests/forms.txt 2007-06-04 23:36:24 UTC (rev 76344) +++ Zope/branches/Zope211-3.4-integration/lib/python/Products/Five/form/tests/forms.txt 2007-06-04 23:45:19 UTC (rev 76345) @@ -34,7 +34,7 @@ browser.open(http://localhost/test_folder_1_/ftf/+/addfieldcontent.html;) print browser.headers - Status: 200 Ok + Status: 200 ... ... We don't have access, we will not be able to get to the protected add form: @@ -49,7 +49,7 @@ browser.addHeader('Authorization', 'Basic manager:r00t') browser.open(http://localhost/test_folder_1_/ftf/+/protectedaddform.html;) print browser.headers - Status: 200 Ok + Status: 200 ... ... @@ -66,7 +66,7 @@ browser.open(http://localhost/test_folder_1_/ftf/edittest;) print browser.headers - Status: 200 Ok + Status: 200 ... ... We can also verify that the title was set correctly, and the not @@ -104,7 +104,7 @@ ctl.value = 'BarDescription' browser.getControl(name=UPDATE_SUBMIT).click() print browser.headers - Status: 200 Ok + Status: 200 ... ... print browser.contents html @@ -129,7 +129,7 @@ ctl.value = 'FooDescription' browser.getControl(name=UPDATE_SUBMIT).click() print browser.headers - Status: 200 Ok + Status: 200 ... ... We will see that something has changed: ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ integrated theuni's additional test from 2.11 (see r73132)
Log message for revision 76209: integrated theuni's additional test from 2.11 (see r73132) Changed: U Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt U Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/HTTPRequest.py U Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/tests/testHTTPRequest.py -=- Modified: Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt === --- Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-06-03 12:27:07 UTC (rev 76208) +++ Zope/branches/2.10-with-ZODB3.8/doc/CHANGES.txt 2007-06-03 12:42:41 UTC (rev 76209) @@ -4,6 +4,10 @@ Change information for previous versions of Zope can be found in the file HISTORY.txt. + Blob-support branch + + - Backported feature from Zope 2.11 to support named temporary files. + Zope 2.10.4 (unreleased) Bugs fixed Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/HTTPRequest.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/HTTPRequest.py 2007-06-03 12:27:07 UTC (rev 76208) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/HTTPRequest.py 2007-06-03 12:42:41 UTC (rev 76209) @@ -13,7 +13,7 @@ __version__='$Revision: 1.96 $'[11:-2] -import re, sys, os, time, random, codecs, inspect +import re, sys, os, time, random, codecs, inspect, tempfile from types import StringType, UnicodeType from BaseRequest import BaseRequest, quote from HTTPResponse import HTTPResponse @@ -394,7 +394,7 @@ taintedform=self.taintedform meth=None -fs=FieldStorage(fp=fp,environ=environ,keep_blank_values=1) +fs=ZopeFieldStorage(fp=fp,environ=environ,keep_blank_values=1) if not hasattr(fs,'list') or fs.list is None: # Hm, maybe it's an XML-RPC if (fs.headers.has_key('content-type') and @@ -1417,7 +1417,11 @@ except: pass return dict +class ZopeFieldStorage(FieldStorage): +def make_file(self, binary=None): +return tempfile.NamedTemporaryFile(w+b) + class FileUpload: '''\ File upload objects @@ -1442,7 +1446,7 @@ else: methods= ['close', 'fileno', 'flush', 'isatty', 'read', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'writelines', -'__iter__','next'] # see Collector 1837 +'__iter__','next', 'name'] # see Collector 1837 d=self.__dict__ for m in methods: Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/tests/testHTTPRequest.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/tests/testHTTPRequest.py 2007-06-03 12:27:07 UTC (rev 76208) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/ZPublisher/tests/testHTTPRequest.py 2007-06-03 12:42:41 UTC (rev 76209) @@ -1,6 +1,15 @@ import unittest from urllib import quote_plus +TEST_LARGEFILE_DATA = ''' +--12345 +Content-Disposition: form-data; name=file; filename=file +Content-Type: application/octet-stream + +test %s + +''' % ('test' * 1000) + class AuthCredentialsTestsa( unittest.TestCase ): def _getTargetClass(self): @@ -684,6 +693,17 @@ req.close() self.assertEqual(start_count, sys.getrefcount(s)) # The test +def testFileName(self): +# checks fileupload object supports the filename +from StringIO import StringIO +s = StringIO(TEST_LARGEFILE_DATA) +env = TEST_ENVIRON.copy() +from ZPublisher.HTTPRequest import HTTPRequest +req = HTTPRequest(s, env, None) +req.processInputs() +f = req.form.get('file') +self.assert_(f.name) + def testFileIterator(self): # checks fileupload object supports the iterator protocol # collector entry 1837 ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope211-3.4-integration/lib/python/ZPublisher/tests/testHTTPRequest.py reverted more (probably) accidental changes from r76217
Log message for revision 76245: reverted more (probably) accidental changes from r76217 Changed: U Zope/branches/Zope211-3.4-integration/lib/python/ZPublisher/tests/testHTTPRequest.py -=- Modified: Zope/branches/Zope211-3.4-integration/lib/python/ZPublisher/tests/testHTTPRequest.py === --- Zope/branches/Zope211-3.4-integration/lib/python/ZPublisher/tests/testHTTPRequest.py 2007-06-03 15:34:25 UTC (rev 76244) +++ Zope/branches/Zope211-3.4-integration/lib/python/ZPublisher/tests/testHTTPRequest.py 2007-06-03 15:34:32 UTC (rev 76245) @@ -1,6 +1,6 @@ import unittest from urllib import quote_plus - + TEST_LARGEFILE_DATA = ''' --12345 Content-Disposition: form-data; name=file; filename=file @@ -10,7 +10,7 @@ ''' % ('test' * 1000) -class AuthCredentialsTestsa( unittest.TestCase ): +class AuthCredentialsTests( unittest.TestCase ): def _getTargetClass(self): from ZPublisher.HTTPRequest import HTTPRequest @@ -759,7 +759,26 @@ from zope.publisher.base import DebugFlags self.assertEqual(getDebug(request), '1') self.assert_(isinstance(getDebugFromZope3(request), DebugFlags)) + +def testMethod(self): +TEST_ENVIRON = { +'REQUEST_METHOD': 'GET', +'SERVER_NAME': 'localhost', +'SERVER_PORT': '80', +} +from StringIO import StringIO +from ZPublisher.HTTPRequest import HTTPRequest +s = StringIO('') +env = TEST_ENVIRON.copy() +request = HTTPRequest(s, env, None) +self.assertEqual(request.method, 'GET') + +env = TEST_ENVIRON.copy() +env['REQUEST_METHOD'] = 'post' +request = HTTPRequest(s, env, None) +self.assertEqual(request.method, 'POST') + def testTrustedProxies(self): TEST_ENVIRON = { 'REQUEST_METHOD': 'GET', @@ -794,7 +813,7 @@ def test_suite(): suite = unittest.TestSuite() -suite.addTest(unittest.makeSuite(AuthCredentialsTestsa, 'test')) +suite.addTest(unittest.makeSuite(AuthCredentialsTests, 'test')) suite.addTest(unittest.makeSuite(RecordTests, 'test')) suite.addTest(unittest.makeSuite(ProcessInputsTests, 'test')) suite.addTest(unittest.makeSuite(RequestTests, 'test')) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/lib/python/ updated externals, after zodbcode was moved in r76244
Log message for revision 76268: updated externals, after zodbcode was moved in r76244 Changed: _U Zope/branches/2.10-with-ZODB3.8/lib/python/ -=- Property changes on: Zope/branches/2.10-with-ZODB3.8/lib/python ___ Name: svn:externals - BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode + BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/zodbcode/trunk/src ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/lib/python/ got it wrong in r76268...
Log message for revision 76269: got it wrong in r76268... Changed: _U Zope/branches/2.10-with-ZODB3.8/lib/python/ -=- Property changes on: Zope/branches/2.10-with-ZODB3.8/lib/python ___ Name: svn:externals - BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/zodbcode/trunk/src + BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/zodbcode/trunk/src/zodbcode ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/ flavour of Zope 2.10 with ZODB 3.8 support (unofficial branch)
Log message for revision 76174: flavour of Zope 2.10 with ZODB 3.8 support (unofficial branch) Changed: A Zope/branches/2.10-with-ZODB3.8/ -=- Copied: Zope/branches/2.10-with-ZODB3.8 (from rev 76173, Zope/branches/2.10) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/setup.py added setup code for new flavours of BTree extensions (borrowed from `ZODB/setup.py`)
Log message for revision 76175: added setup code for new flavours of BTree extensions (borrowed from `ZODB/setup.py`) Changed: U Zope/branches/2.10-with-ZODB3.8/setup.py -=- Modified: Zope/branches/2.10-with-ZODB3.8/setup.py === --- Zope/branches/2.10-with-ZODB3.8/setup.py2007-06-02 21:21:12 UTC (rev 76174) +++ Zope/branches/2.10-with-ZODB3.8/setup.py2007-06-02 21:29:44 UTC (rev 76175) @@ -307,30 +307,6 @@ 'ExtensionClass/pickle/pickle.c', 'Acquisition/Acquisition.h']), -# BTrees -Extension(name='BTrees._OOBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - sources=['BTrees/_OOBTree.c']), -Extension(name='BTrees._OIBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - sources=['BTrees/_OIBTree.c']), -Extension(name='BTrees._IIBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - define_macros=[('EXCLUDE_INTSET_SUPPORT', None)], - sources=['BTrees/_IIBTree.c']), -Extension(name='BTrees._IOBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - define_macros=[('EXCLUDE_INTSET_SUPPORT', None)], - sources=['BTrees/_IOBTree.c']), -Extension(name='BTrees._IFBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - define_macros=[('EXCLUDE_INTSET_SUPPORT', None)], - sources=['BTrees/_IFBTree.c']), -Extension(name='BTrees._fsBTree', - include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'], - define_macros=[('EXCLUDE_INTSET_SUPPORT', None)], - sources=['BTrees/_fsBTree.c']), - # DocumentTemplate Extension(name='DocumentTemplate.cDocumentTemplate', include_dirs=EXTENSIONCLASS_INCLUDEDIRS, @@ -413,9 +389,6 @@ Extension(name = 'persistent.TimeStamp', sources= ['persistent/TimeStamp.c'] ), -Extension(name = 'ZODB.winlock', - sources = ['ZODB/winlock.c'] - ), #zope Extension(zope.proxy._zope_proxy_proxy, @@ -457,6 +430,50 @@ ] +# BTree extension modules (code borrowed from ZODB/setup.py) + +# Include directories for C extensions +include = ['.'] + +# Set up dependencies for the BTrees package +base_btrees_depends = [ +BTrees/BTreeItemsTemplate.c, +BTrees/BTreeModuleTemplate.c, +BTrees/BTreeTemplate.c, +BTrees/BucketTemplate.c, +BTrees/MergeTemplate.c, +BTrees/SetOpTemplate.c, +BTrees/SetTemplate.c, +BTrees/TreeSetTemplate.c, +BTrees/sorters.c, +persistent/cPersistence.h, +] + +_flavors = {O: object, I: int, F: float, 'L': 'int'} + +KEY_H = BTrees/%skeymacros.h +VALUE_H = BTrees/%svaluemacros.h + +def BTreeExtension(flavor): +key = flavor[0] +value = flavor[1] +name = BTrees._%sBTree % flavor +sources = [BTrees/_%sBTree.c % flavor] +kwargs = {include_dirs: include} +if flavor != fs: +kwargs[depends] = (base_btrees_depends + [KEY_H % _flavors[key], +VALUE_H % _flavors[value]]) +else: +kwargs[depends] = base_btrees_depends +if key != O: +kwargs[define_macros] = [('EXCLUDE_INTSET_SUPPORT', None)] +return Extension(name, sources, **kwargs) + +ext_modules += [BTreeExtension(flavor) +for flavor in (OO, IO, OI, II, IF, + fs, LO, OL, LL, LF, + )] + # We're using the module docstring as the distutils descriptions. doclines = __doc__.split(\n) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/lib/python/ use trunk of ZODB (3.8.0a1) friends
Log message for revision 76176: use trunk of ZODB (3.8.0a1) friends Changed: _U Zope/branches/2.10-with-ZODB3.8/lib/python/ -=- Property changes on: Zope/branches/2.10-with-ZODB3.8/lib/python ___ Name: svn:externals - BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transaction svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zodbcode + BTrees svn://svn.zope.org/repos/main/ZODB/trunk/src/BTrees ThreadedAsync svn://svn.zope.org/repos/main/ZODB/trunk/src/ThreadedAsync ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1 ZEOsvn://svn.zope.org/repos/main/ZODB/trunk/src/ZEO ZODB svn://svn.zope.org/repos/main/ZODB/trunk/src/ZODB ZopeUndo svn://svn.zope.org/repos/main/ZODB/trunk/src/ZopeUndo docutils svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope mechanize svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize persistent svn://svn.zope.org/repos/main/ZODB/trunk/src/persistent pytz svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz transactionsvn://svn.zope.org/repos/main/ZODB/trunk/src/transaction zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon zodbcode svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/lib/python/zope/ use zope.proxy trunk, since `decorator.py` is needed for ZODB 3.8
Log message for revision 76177: use zope.proxy trunk, since `decorator.py` is needed for ZODB 3.8 Changed: _U Zope/branches/2.10-with-ZODB3.8/lib/python/zope/ -=- Property changes on: Zope/branches/2.10-with-ZODB3.8/lib/python/zope ___ Name: svn:externals - annotation svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/annotation cachedescriptors svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/cachedescriptors component svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/component configuration svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/configuration contentprovider svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/contentprovider contenttype svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/contenttype copypastemove svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/copypastemove datetime svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/datetime decorator svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/decorator deferredimport svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/deferredimport deprecation svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/deprecation documenttemplate svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/documenttemplate dottedname svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/dottedname dublincore svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/dublincore event svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/event exceptions svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/exceptions filerepresentation svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/filerepresentation formlib svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/formlib hookable svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/hookable i18n svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/i18n i18nmessageid svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/i18nmessageid index svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/index interface svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/interface lifecycleevent svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/lifecycleevent location svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/location modulealias svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/modulealias pagetemplate svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/pagetemplate proxy svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/proxy publisher svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/publisher rdb svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/rdb schema svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/schema security svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/security sendmail svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/sendmail server svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/server size svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/size structuredtext svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/structuredtext tal svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/tal tales svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/tales testbrowser svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/testbrowser testing svn://svn.zope.org/repos/main/zope.testing/tags/3.0/src/zope/testing thread svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/thread traversing svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/traversing viewlet svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/viewlet wfmc svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/wfmc + annotation svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/annotation cachedescriptors svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/cachedescriptors component svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/component configuration svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/configuration contentprovider svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/contentprovider contenttype svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/contenttype copypastemove svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/copypastemove datetime svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zope/datetime decorator
[Zope-Checkins] SVN: Zope/branches/2.10-with-ZODB3.8/lib/python/tempstorage/tests/testTemporaryStorage.py DB.open() doesn't support the `mvcc` parameter in ZODB 3.8, so `checkWithoutMVCCRaisesReadCon
Log message for revision 76183: DB.open() doesn't support the `mvcc` parameter in ZODB 3.8, so `checkWithoutMVCCRaisesReadConflict` won't raise a `ReadConflictError` either Changed: U Zope/branches/2.10-with-ZODB3.8/lib/python/tempstorage/tests/testTemporaryStorage.py -=- Modified: Zope/branches/2.10-with-ZODB3.8/lib/python/tempstorage/tests/testTemporaryStorage.py === --- Zope/branches/2.10-with-ZODB3.8/lib/python/tempstorage/tests/testTemporaryStorage.py 2007-06-02 22:22:03 UTC (rev 76182) +++ Zope/branches/2.10-with-ZODB3.8/lib/python/tempstorage/tests/testTemporaryStorage.py 2007-06-02 22:47:21 UTC (rev 76183) @@ -56,7 +56,7 @@ def doreadconflict(self, db, mvcc): tm1 = transaction.TransactionManager() -conn = db.open(mvcc=mvcc, transaction_manager=tm1) +conn = db.open(transaction_manager=tm1) r1 = conn.root() obj = MinPO('root') r1[p] = obj @@ -66,7 +66,7 @@ # start a new transaction with a new connection tm2 = transaction.TransactionManager() -cn2 = db.open(mvcc=mvcc, transaction_manager=tm2) +cn2 = db.open(transaction_manager=tm2) r2 = cn2.root() self.assertEqual(r1._p_serial, r2._p_serial) @@ -85,10 +85,6 @@ obj.child1 return obj -def checkWithoutMVCCRaisesReadConflict(self): -db = DB(self._storage) -self.assertRaises(ReadConflictError, self.doreadconflict, db, False) - def checkWithMVCCDoesntRaiseReadConflict(self): db = DB(self._storage) ob = self.doreadconflict(db, True) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins