[Zope-dev] zope.app.publication dependencies (volunteersneeded!)
faassen at startifact.com
Thu May 14 09:02:25 EDT 2009
Michael Howitz wrote:
> Am 14.05.2009 um 12:05 schrieb Martijn Faassen:
>> Could you talk a bit about what your branch is trying to accomplish?
> zope.app.exception depends on zope.formlib's namedtemplate mechanism.
> zope.formlib has many many dependencies but only this special function
> of it is used by zope.app.exception. It's needed to render
> customizable the unauthorized views.
> So I replaced zope.formlib by the much more lightweight z3c.template.
Is this replacement compatible with zope.formlib's namedtemplate
mechanism? Will anything break?
The guaranteed compatible step forward to reduce dependencies would be
to extract the namedtemplate mechanism from zope.formlib and place that
somewhere else. zope.formlib can then have an import for backwards
> See also the proposal http://mail.zope.org/pipermail/zope-dev/2009-April/035833.html
I missed this discussion then, my apologies. I still stand by my opinion
that this would suddenly pull in *new* libraries in with a significant
chunk of new code, and we need to be very careful with that and not just
do it to lift a dependency.
>> (see elsewhere on the thread for a way to cut the dependency of
>> zope.app.publication to zope.app.exception completely with little
> This (move the ISystemErrorView) seems to be the right solution to get
> rid of the zope.app.publication dependency on zope.app.exception.
> In a project of mine I need zope.app.exception independently of this
> dependency but I do not want to depend on zope.formlib for a little
> feature of it which can be done by another smaller package.
I understand. Why not move the namedtemplate mechanism somewhere else
entirely, though? This way we'd not introduce new code. The
namedtemplate code itself only seems to depend on zope.traversing, but
that doesn't sound like a good home. The tests depend on
zope.app.pagetemplate, so perhaps it should move there? This is still a
dependency of zope.app.exception anyway, and it itself doesn't appear to
depend on zope.formlib.
zope.app.exception's UI bits are a curious case in that they're not
really part of the ZMI, though they integrate with the ZMI and assume
the existence of some macros. It's also a zope.app.* package and we'd
like to get rid of those in the toolkit. What to do with it?
More information about the Zope-Dev