[z3-five] Re: Five fails on my 2.8 instance

Philipp von Weitershausen philipp at weitershausen.de
Tue Nov 16 15:21:26 MET 2004


Tim Hicks wrote:
>>>    class ISimpleItem(IItem, IPersistent, IAcquisition, IRoleManager):
>>>  File "/home/tim/zope/X3-3.0.0/lib/python/zope/interface/interface.py",
>>>line 416, in __init__
>>>    raise TypeError, 'Expected base interfaces'
>>>TypeError: Expected base interfaces
>>
>>Yes, this makes sense because in Zope 2.8, the IPersistent interface is
>>an Interface.Interface (old-style) whereas in Zope 2.7, it is a
>>zope.interface.Interface (new-style). Once we support Zope 2.8, we'll
>>have to think about what to do with that.
> 
> Either I don't follow properly or that's a little strange.  Why would 2.7
> use 'new-style' interfaces while 2.8 uses 'old-style'.

2.7 doesn't use new-style interface, Five does :). In 2.7, IPersistent 
doesn't exist, so we just make a stub one (Five/interfaces.py, line 25). 
2.8 and X3.0 share ZODB 3.3 which *does* have IPersistent, but 
apparently it's not being instantiated as a new-style interface (even 
though it should).

Off the top of my head I'd suspect that for some reason, 
persistent/interfaces.py does not find zope.interface as it should and 
thus does not create IPersistent as a new-style interface. Maybe you can 
track down the problem, it might have to do something with the Python Path.

For a starter, you could change Five.interfaces.ISimpleItem to not 
include IPersistent for the moment and take it from there. Maybe the 
changes that are needed to make Five 2.8-compatible are trivial...

Philipp


More information about the z3-five mailing list