Re: [Zope3-dev] Re: zope.app.twisted.main?

2007-02-07 Thread Chris Withers

Philipp von Weitershausen wrote:

Okay, how about the config parser registers the utility:


The config parser (ZConfig) is generic 


Well, it runs of a schema which uses handlers specific to the project, 
so I don't see what your point is here...


the component architecture. The main() program in zope.app.appsetup, 
which makes use of the zope.conf configuration, would have to do it.


...it sounds like Zope 3's ZConfig schema creates an inert source of 
information, unlike Zope 2's, which instantiates things as it parses the 
config. Is that the case?


Right, but the whole point of factoring it out to a utility is to gain 
the ability to override things. If it's registered using 
z.c.provideUtility(), it'll be hard to impossible to override it using 
overrides.zcml. 


True, but if this happens in parsing zope.conf, you don't want to be 
able to change it later...


That's why I suggested we use named utilities because 
the we don't need to work with overrides.zcml.


I'm still struggling with why they need to be named, no doubt I'll find 
out why if/when I make a start on this ;-)


If so, what bad things could happen if the zodb sections in zope.conf 
were made optional and a later zcml statement provided the utility?


utility factory=myIRootObjectProvider /


Yeah, but how would you implement myIRootObjectProvider w/o having 
access to the ZODB? 


I'd envisage myIRootObjectProvider would be the thing which opened the 
zodb...


You don't know which ZODB you're going to get the 
root object from because that's decided *at runtime* in the main() 
program by reading zope.conf.


I thought you said the ZCML was processed after the main() stuff?

Because I'm not sure how persistent objects behave in a global registry. 


I'd imagine the root would just be a factory that opened a new 
connection/etc on traversal, or when it was requested by the 
publication, or some such...


Right now in the Zope default publication, the root object is gotten 
*after* opening the DB.  If we'd register the (persistent) root object 
in the global registry, it might exist w/o any ZODB connections open. 
Not sure if that's every going to occur, or if that's going to be a 
problem, etc.


I would hope to keep the semantics of getting the root object after 
opening the db in the same way...


Anyway, I think I've tried to give as many pointers as I could. I'm sure 
some of the things discussed here will come up when you'll implement 
this :).


Yep, I think it's time to start cutting code... eep...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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.mimetype / z3c.filetype

2007-02-07 Thread Bernd Dorn


On 07.02.2007, at 03:42, Benji York wrote:


Luis De la Parra wrote:
I don't know if there is some licesing or some other kind of  
political
issues ( zope vs z3c ), but IMVHO it would be great if the two  
packages
were merged. I'm not really a zope developer yet, but if the  
maintainers of

those packs are interested, I could try to help with that.


Interest is abundant; time and motivation are lacking.
--


hm, the same problem here
currently our company has no time to do this merge, but if you have  
time, i'll be available if you have questions


i am the maintainer of the z3c.filetype package, which is in  
production use for our projects together with z3c.extfile


the main motivation for z3c.filetype was to extract the content type  
from large binary files without using the file extension information,  
we use this for media formats, afaik zope.mimetype goes further when  
it comes to textual content and encodings, but you are right they  
share a lot.


regards, Bernd




Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/zope- 
mailinglist%40mopa.at




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



[Zope3-dev] Re: Test layers for zope.app.* packages

2007-02-07 Thread Philipp von Weitershausen

Fred Drake wrote:

On 2/6/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote:

An egg should only *depend* on setuptools if it uses things like
pkg_resources (e.g. for namespace packages).


But there's no need to depend on setuptools for namespace packages
generally;


Well, if an egg has a namespace package that chooses to declare itself 
as such using pkg_resources, the egg better depends on setuptools so 
that pkg_resources is available when the egg is installed.


Or am I missing something?


--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com