[ZODB-Dev] ImportError: cannot import name Interface

Christian Robottom Reis kiko at async.com.br
Wed Aug 25 21:40:06 EDT 2004


On Wed, Aug 25, 2004 at 09:32:08PM -0400, Tim Peters wrote:
> [Christian Robottom Reis]
> > It's easy to understand:
> >
> >     .../python2.x/site-packages/PythonCAD.pth:
> >         PythonCAD
> >
> >
> >     .../python2.x/site-pachages/PythonCAD/
> >         Interface
> >         Application
> >
> > Having PythonCAD's Interface in the global namespace is naughty.
> 
> Right, what I *can't* tell without installing PythonCAD myself is whether
> that's the *only* glitch.  Since Diez's example died so early, can't guess
> whether more problems appear after that one is resolved.

I agree; however, isn't it a fair assumption that the main issue between
PythonCAD and ZODB will be shared namespaces, since there is conceivably
little else PythonCAD *can* do that affects the ZODB (apart from erasing
glibc when setup.py install is done <wink>)?

The file BTrees/Interfaces.py also contained an unqualified import of an
Interface package (from Interface import Interface) -- I didn't check if
you took care of that as well. That file doesn't seem to be hugely
important, though.

The file Support/zpkgtools/app.py contains a class called Application
but it doesn't seem to be imported from anywhere else.

Of course, if you have objects of an unqualified class called
"Application" stored in your ZODB..

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331


More information about the ZODB-Dev mailing list