[ZODB-Dev] Re: Re: [Zope3-dev] Persistent module notes and proposal

Leonardo Rochael Almeida leo at hiper.com.br
Wed Jan 7 22:02:38 EST 2004


At Mon, 05 Jan 2004 18:09:16 -0500, Jim Fulton wrote:

> Casey Duncan wrote:
>> On Mon, 05 Jan 2004 16:36:24 -0500
>> Jim Fulton <jim at zope.com> wrote:
>> [...]
>> 
>>>If you wanted to share a list that way, you'd need to make it a
>>>persistent list.
>>>
>>>I'm inclined to disallow import of non-persistent objects from
>>>persistent modules.
>> 
>> 
>> I agree. So classes and functions in persistent modules are persistent
>> automagically?
> 
> Yes.  There's a mapping step that happens after module execution in
> which we map regular classes, functions, and interfaces to persistent
> ones, updating existing values as appropriate to make imported refernces
> do the right thing.

What if we do it the other way around, and treat module globals as
explicitly volatile?

PM globals wouldn't survive a server restart nor a PM edit, as editing the
module would imply a module reload.

I think this matches more closely the behaviour of fs modules, which we
are already used to. This might make PMs less useful, but their semantic
will be more easily defined and their implementation a little bit easier,
I think. This achieves the goal of reflecting the module state solely by
their source, and even allows PM global mutables to be used for volatile
registries, just like fs modules.

Cheers, Leo




More information about the ZODB-Dev mailing list