[Zope-CMF] Re: Plone needs a release this week

yuppie y.2007- at wcm-solutions.de
Tue Aug 7 08:42:54 EDT 2007


Hi!


Wichert Akkerman wrote:
> Previously yuppie wrote:
>> Wichert Akkerman wrote:
>>> Previously yuppie wrote:
>>>> The check for aq_base should be fine, but your example shows a second 
>>>> issue: type() is used to get the factory. That only works if the class 
>>>> is the factory.
>>>>
>>>> So there seems to be indeed a need to store somewhere the factory name :(
>>> I think we need that to get the export of placeless components as well.
>>> Without it I can't seem to think of a way to determine how the component
>>> should be created: using a factory method (which could be the class
>>> type itself) or some other way.
>> If 'factory' is used, I also can't see a way to determine the factory 
>> used on import.
>>
>> If 'component' is used, there might be a solution: __module__ should be 
>> set correctly. Maybe we can loop through the objects in the module and 
>> compare them with our component?
> 
> But we can't know if component or factory is used. What if someone uses
> a factory which returns a component with a __module__ set?

Don't know what __module__ usually looks like if the component is 
created at registration time. I did hope there would be a way to tell 
the difference, but I might be wrong.

>> But if we have to keep track of registrations anyway, it might be better 
>> to do this for all kinds of registrations instead of using a hack.
> 
> That is my preference. I have added a statement to REAMDE.txt indicating
> that export of placeless utilies is not supported at the moment.

Fine.

But you accidentally checked in your debug code as well. And please 
don't forget to forward port your changes to the trunk.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list