[Zope-dev] (re)moving browser subpackage from zc.catalog?

Michael Howitz mh at gocept.com
Wed Oct 13 07:16:29 EDT 2010


Am 13.10.2010 um 10:02 schrieb Jan-Wijbrand Kolman:
> On 10/6/10 08:08 , Michael Howitz wrote:
>> Am 05.10.2010 um 20:21 schrieb Jan-Wijbrand Kolman:
>>> Today I fixed a small bug in zc.catalog (the ftesting.zcml depended
>>> on a permission name that has been removed from zope.dublincore).
>> 
>> Actually the permission has been renamed (from zope.app.dublincore to
>> zope.dublincore)  to get rid of the "app" part in its name.
> 
> If I would be pedantic here I'd say there is no such thing as renaming a 
> permission. When the old name is gone, it is gone. There's no mechanism 
> similar to the BBB imports for the permission ids.

Not pedantic enough as there is a mechanism to rename a permission, see http://pypi.python.org/pypi/zope.dublincore/3.8.0#id3

In version 3.7.0 the backward compatible renaming was removed.

>>> This made me realize that zc.catalog contains ZMI code in the
>>> browser subpackage.
>>> 
>>> Are people still using this ZMI code from zc.catalog? Would it be
>>> an idea to move the ZMI code out of the package (a bit similar to
>>> how various zope.app.* package have been refactored)? It would
>>> make maintaining this package in respect to the ZTK easier.
>> 
>> zc.catalog has only test dependencies on zope.app.* packages. So you
>> do not install these dependencies when using zc.calalog as a
>> library. The zope.app.* dependencies might need a bit polishing. But
>> I do not see a big win moving the browser part into a separate
>> package. Especially as zc.catalog should depend on this new package
>> for backward compatibility reasons (at least for a while).
> 
> Actually, it is more than just a test dependency. The toplevel 
> configure.zcml conditionally configures the browser subpackage whenever 
> zope.app.form is available. This zope.app.form conditional is not even 
> "enough", as sometimes you can still have zope.app.form on your path, 
> but zcml directives like addMenuItem and editForm used in 
> zc.catalog.browser's configure.zcml might not have been configured.
> 
> I could imagine we change zc.catalog so that the toplevel configure.zcml 
> never includes the browser subpackage's configure.zcml and people that 
> need the ZMI code, need to include the zc.catalog.browser subpackage 
> themselves. This would still leave the test dependency (which is 
> annoying but alas), but at least make the zc.catalog easier to reuse.

I'm fine with these suggestions but I'd suggest a new additional "browser" extra, which declares the dependencies of the browser subpackage.


Yours sincerely,
-- 
Michael Howitz · mh at gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development



More information about the Zope-Dev mailing list