[Zope-dev] zope.publisher dependencies

Tres Seaver tseaver at palladion.com
Tue Feb 24 09:26:32 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shane Hathaway wrote:
> 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?

+1.

> 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.

zope.browser is supposed to be a zero-dependency spot for commonly-used
interfaces:

  This package provides shared zope browser components without other
  dependencies.

So I wouldn't move anything depending on zope.location into that
package.  Your new package idea sounds better.

> 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.

Frankly, any code using a testing stub which is that heavyweight needs
to be refactored.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJpAOY+gerLs4ltQ4RAjp/AJ9sbBrxvOrWkjFuypP7/16n75uUkwCgvtZW
3J0s+vDo0p1nxkxhtrFbS/A=
=FUZq
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list