[Zope-dev] zope.publisher dependencies

Shane Hathaway shane at hathawaymix.org
Tue Feb 24 03:08:54 EST 2009


I've been working on the dependencies to and from zope.publisher. 
Refining the dependencies should make it easier to integrate 
zope.pipeline when it's ready.

I've noticed that nearly all packages that depend on zope.publisher 
depend only on a few pieces of it:

   - zope.publisher.interfaces

   - zope.publisher.browser.Browser{View|Page}

   - zope.publisher.browser.TestRequest

One simple, low-risk refactoring I would like to do is move 
zope.publisher.interfaces into its own package, make zope.publisher a 
namespace package, and make zope.publisher depend on 
zope.publisher.interfaces.  The __init__.py in zope.publisher is already 
empty, so I expect the namespace conversion to be safe.  Then I'd like 
to refine the dependency list of various packages that only require 
zope.publisher.interfaces.  Any objections?

It is less clear what we should do with BrowserView and BrowserPage. 
They depend on zope.location, unlike the rest of zope.publisher, so they 
don't really fit there.  Perhaps those two belong in a new package, 
"zope.publisher.browserbase".  There is also the tiny new "zope.browser" 
package.  Would it make sense to move them there?  (It's hard to tell 
what the intent of the new package is.)  I'd love to hear other suggestions.

As for TestRequest, I could update the setup.py of various packages that 
currently depend on zope.publisher just for TestRequest.  I would make 
zope.publisher a test-only requirement.

Shane



More information about the Zope-Dev mailing list