[Zope3-dev] Transaction bound cache

2007-09-17 Thread Christian Zagrodnick

Hi

i've got a very simple transaction bound cache implementation. That is 
the cache gets invalidated on transaction end.


It's used like this:

class Foo(object):

  data = TransactionBoundCache('_v_store_it_here', dict)

where `dict` is the cache factory.


Shall I add this to zope.cachedescriptors?

--
Christian Zagrodnick

gocept gmbh  co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: zope.testbrowser packaging

2007-09-17 Thread Jim Fulton

+1

Also, extras is a miss-feature.

Jim

On Sep 15, 2007, at 10:43 AM, Philipp von Weitershausen wrote:


Benji York wrote:
I have a small issue with zope.testbrowser packaging I'd like to  
get some input on.  If I were to have started the project today,  
it would likely have been zc.testbrowser, which would have no Zope  
3 dependencies (or functionality) and zc.testbrowser.zope, which  
would have, and depended on zc.testbrowser.  Well, that didn't  
happen, but there are parallels to the current situation that  
might be informative.
There is a configuration bug in testbrowser that means that unless  
you include the test extra, you won't get the Zope 3  
dependencies.  I suspect most people either include that extra, or  
accidentally include the dependencies through other packages.  I  
have two ideas for fixing this:
1) introduce a zope extra that everyone will have to use  
(basically just rename test to zope;
2) take a lesson from the fictional zc.testbrowser and introduce  
another package (zope.testbrowser.zope) that contains the Zope 3  
bits and depends on zope.testbrowser.


I think this would be very hard if not impossible to do from a  
packaging perspective (declaring zope.testbrowser a namespace  
package *and* have it contain things like README, configure.zcml,  
etc.).


I think I prefer the second, despite it's strange appearance.   
Thoughts?


Let's look at this from the beginning. zope.testbrowser contains

a) a reusable, completely Zope-independent test browser

b) integration with zope.app.testing.functional, in other words a test
   browser for testing web applications based on zope.publisher.

I think in its current use, zope.testbrowser is *mostly* used as  
b). When used as a), I don't think anybody is bothered by the fact  
that it might or might not have more dependencies (other than the  
inconvenience of having to install more stuff than actually  
necessary).


So here's what I suggest: Factor out a) to a new package  
'zc.testbrowser' (or whatever) and make 'zope.testbrowser', the  
remaining b), depend on zc.testbrowser, zope.app.testing and all  
that other stuff properly.


That way

- packaging and nomenclature are straight-forward,

- we don't have to break backwards compatibility anywhere,

- people who have used 'zope.testbrowser' because of a) until now  
won't experience any problems, even though we should probably tell  
them to switch to zc.testbrowser.




--
http://worldcookery.com -- Professional Zope documentation and  
training

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/jim%40zope.com



--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] zope.testbrowser packaging

2007-09-17 Thread Jim Fulton
extras are a terrible feature.  They aren't fully supported by  
setuptools and they make it more complicated.  Did you write tests  
for every permutation of your extras?


Jim

On Sep 15, 2007, at 9:44 PM, Stephan Richter wrote:


On Saturday 15 September 2007 08:48, Benji York wrote:

1) introduce a zope extra that everyone will have to use (basically
just rename test to zope;


I prefer this solution. I have done this before for z3c.rml, where  
I put the
page template support into a pagetemplate extra declaration. I  
liked this
solution a lot. I would have never considered developing another  
package for
a fairly trivial extension of a few lines. I think eggs have the  
potential

for package proliferation and senseless overhead.

Regards,
Stephan
--
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/jim%40zope.com



--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Transaction bound cache

2007-09-17 Thread Jim Fulton
No, that would introduce a dependency on zodb.  I suggest a separate  
package.


Jim

On Sep 17, 2007, at 6:03 AM, Christian Zagrodnick wrote:


Hi

i've got a very simple transaction bound cache implementation. That  
is the cache gets invalidated on transaction end.


It's used like this:

class Foo(object):

  data = TransactionBoundCache('_v_store_it_here', dict)

where `dict` is the cache factory.


Shall I add this to zope.cachedescriptors?

--
Christian Zagrodnick

gocept gmbh  co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/jim%40zope.com



--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com