[Zope3-dev] Names in zope.app.traversing have moved to zope.app.traversing.api.

Jim Fulton jim at zope.com
Tue May 25 14:47:17 EDT 2004


If you have code that looks like:

   from zope.app.travering import somename

   ...

   somename(...)

I broke your import.  Sorry.
But you should change your code to look like:

   from zope.app import zapi

   ...

   zapi.somename(...)

I should have sent a warning about this earlier.

Here's my checkin message:

Moved the code from zope.app.traversing.__init__.py to
zope.app.traversing.api to avoid a common source of circular import
problems.

I'll note:

- We really need a tool for detecting circular imports. If I had such
   a tool, I would try hard to eliminate them. They are like land
   mines.

- Fat __init__.py files tend to produce circular imports.
   It's useful to have thin __init__.py files that import names for
   convenience, but this needs to be done with great care.

- I bet most uses of zope.app.traverse.api.traverse can go away
   now, since we don't care about context wrappers any more.

- I suspect that a lot of the path-manipulation calls can go away
   as we absorb the impacts of last summer's parentgeddon.

- Most of places that import zope.app.traverse.api should probably
   be converted to use zapi.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope3-dev mailing list