[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cmf
Subject:    [Zope-CMF] Re: PersistentComponents: wrapped or not?
From:       Hanno Schlichting <plone () hannosch ! info>
Date:       2007-03-14 11:30:40
Message-ID: 45F7DCE0.7050405 () hannosch ! info
[Download RAW message or body]

Hi,

yuppie wrote:
> Apparently I'm missing something because this doesn't make much sense to
> me:
> 
> ComponentRegistryXMLAdapterTests use
> z.c.persistentregistry.PersistentComponents. These tests register
> wrapped tools, the registry returns them with their original wrapper.
> 
> If I add transaction.commit(), I get a TypeError: "Can't pickle objects
> in acquisition wrappers."
> 
> This is what I'd expect.

Me too.

> But:
> 
> Importing componentregistry.xml in CMF, wrapped tools are registered as
> well. No error in that case, but unless re-wrapped by
> five.localsitemanager's PersistentComponents, the registry returns
> unwrapped tools.
> 
> Any idea what's different in the second case? Why does registerUtility()
> work in that case, removing the wrapper without raising an error?

Actually I don't know why this works at all and I think it is a bug. We
should probably add an aq_base to the registerUtility call in the
handler to make sure we are not going to be screwed later on with some
obscure bugs.

Hanno

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic