[Zope-dev] When is the configuration read in Zope 2.7?

Erik A.Dahl edahl at confmon.com
Mon May 17 14:38:55 EDT 2004


Ok,

I think I have a fix for this but we have a little semantics issue.  I 
thought that once the Zope config was set it could not be changed.  In 
the new ZOPE_CONFIG patch the environ variable only gets used as a last 
resort in Zope.app() if no other configuration has been set.  To do 
this I added a isConfigured() function to App.config to check its 
_config global.  I'm assuming that this is the "official" Zope config, 
correct?

Now there is a test testZopeRunConfigure in 
lib/python/Zope/Startup/tests/testStarter.py that runs 
App.config.getConfiguration() and then makes a test config file and 
sets it.  The result is a test where the config is reset within one 
run.  This test fails with the semantics described above.  Which is 
correct?  I'm enclosing the patch for reference.

-EAD

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZOPE_CONFIG.patch
Type: application/octet-stream
Size: 4165 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20040517/33710b2a/ZOPE_CONFIG.obj
-------------- next part --------------


On May 17, 2004, at 12:20 PM, Erik A.Dahl wrote:

> Things changed around a bit since I did this patch.  I'm trying to get 
> a new one working but am having some issues with the 2.7 trunk in svn. 
>  I think in general the startup sequence could use some clean up.  I'm 
> working on mapping how it all works maybe that would help make it less 
> opaque.
>
> -EAD
>
> On May 15, 2004, at 12:53 PM, Chris McDonough wrote:
>
>> I think Fred might have some ideas about how to do the ZOPE_CONFIG
>> feature better if you can coax them out of him. ;-)
>>
>> On Sat, 2004-05-15 at 03:56, Andreas Jung wrote:
>>> --On Samstag, 15. Mai 2004 1:59 Uhr +0200 "Stefan H. Holek"
>>> <stefan at epy.co.at> wrote:
>>>
>>>>
>>>> Zope tests fail for me, unfortunately Andreas cannot reproduce this.
>>>>
>>>
>>> The ZOPE_CONFIG patch was responsible for other failures. I reverted 
>>> the
>>> change
>>> and check for a better solution by next week.
>>>
>>> -aj
>>
>>
>> _______________________________________________
>> Zope-Dev maillist  -  Zope-Dev at 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 maillist  -  Zope-Dev at 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 )


More information about the Zope-Dev mailing list