[Zope3-dev] Re: import failure in zope.app.broken tests

2007-02-20 Thread Philipp von Weitershausen

Baiju M wrote:

Hi,
There is an import failure when running 'python2.4 test.py -s 
zope.app.broken'

I have a fix here: http://zope3.pastey.net/6899
Commit it ?


What's causing the failure? And how does your patch fix it? Without this 
information, it'll be hard for us to comment on them. (The same is true 
for commit messages).



--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: import failure in zope.app.broken tests

2007-02-20 Thread Baiju M

Philipp von Weitershausen wrote:


Baiju M wrote:


Hi,
There is an import failure when running 'python2.4 test.py -s 
zope.app.broken'

I have a fix here: http://zope3.pastey.net/6899
Commit it ?



What's causing the failure?



This is the output I am getting when running: python2.4 test.py -s 
zope.app.broken


 Running tests at level 1
 Test-module import failures:

 Module: zope.app.broken.tests

 ImportError: cannot import name IBroken


 Total: 0 tests, 0 failures, 0 errors

 Test-modules with import problems:
   zope.app.broken.tests


In broken.py we are importing IAnnotations before IBroken definition
So the import cycle is like this:

(Pdb) where
...
 /var/tmp/wa/Zope3trunk/src/zope/app/broken/broken.py(26)?()
- from zope.annotation.interfaces import IAnnotations
 /var/tmp/wa/Zope3trunk/src/zope/annotation/__init__.py(20)?()
- from zope.annotation.factory import factory
 /var/tmp/wa/Zope3trunk/src/zope/annotation/factory.py(21)?()
- import zope.app.container.contained
 /var/tmp/wa/Zope3trunk/src/zope/app/container/contained.py(41)?()
- from zope.app.broken.broken import IBroken
(Pdb) next
ImportError: 'cannot import name IBroken'



And how does your patch fix it?


In broken.py define IBroken before importing IAnnotations
Also I moved the original defintion of IBroken to zope.app.broken.interfaces

Regards,
Baiju M

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com