[Zope-dev] Re: SVN: Zope/trunk/ Moved two implements declarations from Five into the proper classes.

Laurence Rowe l at lrowe.co.uk
Tue Oct 23 07:00:31 EDT 2007


Lennart Regebro wrote:
> On 10/23/07, Laurence Rowe <l at lrowe.co.uk> wrote:
>> Philipp von Weitershausen wrote:
>>> Hanno Schlichting wrote:
>>>> Log message for revision 80945:
>>>>   Moved two implements declarations from Five into the proper classes.
>>> I object to this change. HTTPRequest does not really fulfil the
>>> IBrowserRequest interface, and ObjectManager isn't a real IContainer
>>> either. I understand that somebody made a mistake when they declared
>>> them as such in the early days of Five. This is the reason we can't take
>>> it back. But, at least as a sign of the fact that they're not (yet) the
>>> real deal, this declaration has remained in ZCML.
>>>
>>> A sensible step forward would be to make HTTPRequest a full
>>> IBrowserRequest (we're getting there). As for ObjectManager, I think
>>> IContainer implies a couple of semantics (such as unicode names, the
>>> sending of events, etc.) that we should look closer at before deciding.
>>>
>> I've found the fact that ObjectManager implements IContainer to be a
>> problem in my application where I have a mixin implementing then
>> ObjectManager expectations by adapting to IContainer (this allows most
>> of my code to be zope 3 like with the zope 2 compatibility contained).
>> I've had to subclass IContainer and adapt to my subclass instead.
>>
>> The only place I've run into problems using unicode names is in the
>> ZCatalog (or maybe CatalogTool) where there is a test that a name
>> isinstance str.
> 
> I guess we need to either actually implement the relevant interfaces,
> or split the interfaces into something that can be implemented...
> 

Preferably not too far down the class hierarchy. It would be useful for 
things such as cmf's PortalFolder not to implement IContainer directly, 
it makes non-zodb content much easier if an adapter can be used.



More information about the Zope-Dev mailing list