[Zope-CMF] Re: collector 198 and missing skins

Florent Guillaume fg at nuxeo.com
Wed Nov 24 06:41:54 EST 2004


In article <16803.42375.27838.763246 at gargle.gargle.HOWL> you write:
> Tres Seaver wrote at 2004-11-23 12:14 -0500:
> >Florent Guillaume wrote:
> >> This bug about _v_skindata reverting to None bit us again and again.
> >> http://zope.org/Collectors/CMF/198
> >> I'll have to fix it. Anyone has suggestion on how to best store this? 
> >> Module scope var (will that work) ? Thread-local var (how) ?
> >
> >Why not stash it on the REQUEST object?
> 
> We use the SkinsTool in ZEO clients directly implemented by
> Python scripts. They do not have a "REQUEST".

I'm not sure I understand what your setup is. But surely it'll be simple
for you to provide a fake request object tied to the transaction ?

> Of course, a minor modification was necessary to give
> the SkinsTool a hint which skin to use despite the lack
> of REQUEST.
> 
> We have discussed a "_p_sticky" extension for the ZODB on "zodb-dev"
> and I posted an implementation to "zodb-dev".
> It allows to protect "_v_" variables across subtransaction
> boundaries. We use it for about 9 months without problems.
> That would be an alternative.

That would be:
http://mail.zope.org/pipermail/zodb-dev/2004-February/006645.html
This looks nice but CMF cannot rely on code that is not in core ZODB.
Have you tested that code a lot? Could you put it as a patch in the
Collector?

For core ZODB, as Tim says in
http://mail.zope.org/pipermail/zodb-dev/2004-November/008208.html
an object can be gc'ed and thus deactivated at any time, so we have
to find a solution that doesn't rely on _v_ attributes.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-CMF mailing list