On Mon, Aug 23, 2010 at 3:41 AM, Michael Howitz <m...@gocept.com> wrote:
> Am 22.08.2010 um 15:09 schrieb Tres Seaver:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Michael Howitz wrote:
>>> Am 19.08.2010 um 15:52 schrieb Jim Fulton:
>>>> On Thu, Aug 19, 2010 at 4:05 AM, Michael Howitz <m...@gocept.com> wrote:
>>>>> Hi,
>>>>>
>>>>> I wrote a blue print to extract the parts of zope.app.generations into a 
>>>>> new zope.generations package.
>>>>> See: 
>>>>> https://blueprints.launchpad.net/zope.app.generations/+spec/zope.generations
>>>>>
>>>>> Any opinions?
>>>> +1 in general.  Can you add to the proposal a list of what you think
>>>> the dependencies of zope.generations will be?
>>>
>>> This is the list: (I also added it to the proposal.)
>>>
>>> - ZODB
>>> - transaction
>>> - zope.app.publication (only needed in a utility function to get the 
>>> database root folder)
>>> - zope.component
>>> - zope.interface
>>> - zope.processlifetime
>>
>> It seems like we should be able to remove the zope.app.publication
>> dependency:  don't the processlifetime events include a "database
>> opened" event we could use?
>
> The "database opened" event from zope.processlifetime is already used, 
> zope.app.publication is needed for this function in 
> zope.app.generations.utility:
>
> def getRootFolder(context):
>    return context.connection.root().get(
>        zope.app.publication.zopepublication.ZopePublication.root_name, None)
>
> I think this function is needed in every generation script.

Hm, this depends on a particular application (as defined by zope.app).

> Is there another way to get the root folder?

Some apps probably don't use a root folder.

> Should the root_name be hard coded here instead of importing it?

I think this is an issue for the individual zope.generations plug ins.
Does zope.generations itself use this?

Jim

-- 
Jim Fulton
_______________________________________________
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 )

Reply via email to