[Zope-Coders] If 'import Zope' is bad then...

Shane Hathaway shane@zope.com
Wed, 23 Jan 2002 10:35:01 -0500


Chris Withers wrote:

> Shane Hathaway wrote:
> 
>>Well, it's becoming apparent that unit tests for a lot of Zope products
>>really need to use "import Zope".  The CMF tests need to be cleaned up,
>>but you may find that not all dependencies on the Zope package and
>>products can be removed without major surgery. :-(
> 
> Reading between the lines, does that mean that if I need to do:
> 
> from Products.x.x import y
> 
> ...then I need to do:
> 
> import Zope
> 
> ...beforehand?

Sometimes.  It depends on which product you're importing.  To import the 
current PageTemplate product, for example, you have to import Zope 
first, because of a bug that doesn't happen except in unit tests.

Good luck, soldier!

Shane