[PEAK] Update on Zope X3 compatibility (was Re: Does a PEAK-ized webware esist ?)

Phillip J. Eby pje at telecommunity.com
Fri Jan 30 20:22:32 EST 2004


An update: doing 'import zope.interface' before any PEAK imports fixes this 
with Milestone 3, but PyProtocols requires Milestone 4.  I haven't tried 
Milestone 4 yet.

It appears as though the actual problem may be due to recent changes in 
PEAK's 'whenImported()' function.  Apparently, it's possible under certain 
circumstances for it to cause an already-imported module to be reloaded, 
and that's where it's breaking zope.interface.  So there's actually a PEAK 
bug here that needs to be fixed, because I've confirmed it's doing the same 
thing to the 'peak.config.interfaces' package.  (It just doesn't do 
anything harmful there.)


At 07:34 PM 1/30/04 -0500, Phillip J. Eby wrote:
>Curiouser and curiouser...  I'm having little or no luck getting 
>zope.interface to work at *all* in a current CVS checkout.  However, the 
>latest Zope is supposed to require Python 2.3.3, while we still support 
>2.2.2 for PEAK.  Sigh.  I'm going to have to download a previous milestone 
>and see what's going on.  One of the weirder things is that just doing 
>'import zope.interface' with no PEAK stuff even on PYTHONPATH is still 
>enough to get hosed results!
>
>I'll report more when I know more.
>
>At 07:05 PM 1/30/04 -0500, Phillip J. Eby wrote:
>>Still, it's pretty obvious from your traceback that simply *having* Zope 
>>on the path is sufficient to trigger this, so I should probably just 
>>build the latest milestone and give it a whirl.
>>
>>
>>>Traceback (most recent call last):
>>>   File "/usr/bin/peak", line 3, in ?
>>>     from peak.running import commands
>>>   File "/usr/lib/python2.3/site-packages/peak/running/commands.py", line
>>>124, in ?
>>>     class AbstractCommand(binding.Component):
>>>   File "/usr/lib/python2.3/site-packages/peak/running/commands.py", line
>>>133, in AbstractCommand
>>>     argv    = binding.Obtain('import:sys:argv')
>>>   File "/usr/lib/python2.3/site-packages/peak/binding/components.py", line
>>>520, in __init__
>>>     self.targetName = adapt(targetName, IComponentKey)
>>>   File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx", line
>>>175, in _speedups.adapt
>>>   File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx", line
>>>170, in _speedups.adapt
>>>   File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx", line
>>>378, in _speedups.Protocol__adapt__
>>>   File "/usr/lib/python2.3/site-packages/peak/binding/components.py", line
>>>374, in <lambda>
>>>     lambda ob, proto: toName(ob, ComponentName, 1),
>>>   File "/usr/lib/python2.3/site-packages/peak/naming/names.py", line 306,
>>>in toName
>>>     import URL
>>>   File "/usr/lib/python2.3/site-packages/peak/naming/URL.py", line 9, in ?
>>>     from peak.model.elements import Struct
>>>   File "/usr/lib/python2.3/site-packages/peak/model/elements.py", line 17,
>>>in ?
>>>     from peak.persistence import Persistent
>>>   File "/usr/lib/python2.3/site-packages/peak/persistence.py", line 13, 
>>> in ?
>>>     Persistent             = importString('persistence:Persistent', md)
>>>   File "/usr/lib/python2.3/site-packages/peak/util/imports.py", line 79,
>>>in importString
>>>     item = __import__('.'.join(path), globalDict, globalDict, ['__name__'])
>>>   File "/d/src/python/z/ZopeX3-0.0m3/src/persistence/__init__.py", line
>>>16, in ?
>>>     from persistence._persistence import Persistent
>>>   File "/d/src/python/z/ZopeX3-0.0m3/src/persistence/interfaces.py", line
>>>14, in ?
>>>     from zope.interface import Interface
>>>   File "/d/src/python/z/ZopeX3-0.0m3/src/zope/interface/__init__.py", line
>>>93, in ?
>>>     moduleProvides(IInterfaceDeclaration)
>>>   File "/d/src/python/z/ZopeX3-0.0m3/src/zope/interface/declarations.py",
>>>line 1258, in moduleProvides
>>>     raise TypeError(
>>>TypeError: moduleProvides can only be used once in a module definition.
>>>
>>>
>>>
>>>_______________________________________________
>>>PEAK mailing list
>>>PEAK at eby-sarna.com
>>>http://www.eby-sarna.com/mailman/listinfo/peak
>>
>>_______________________________________________
>>PEAK mailing list
>>PEAK at eby-sarna.com
>>http://www.eby-sarna.com/mailman/listinfo/peak
>
>_______________________________________________
>PEAK mailing list
>PEAK at eby-sarna.com
>http://www.eby-sarna.com/mailman/listinfo/peak




More information about the PEAK mailing list