[Zope-dev] makeClass and makeClassForTemplate
yuppie
y.2012 at wcm-solutions.de
Tue Sep 4 20:23:56 UTC 2012
Hi Laurence!
Laurence Rowe wrote:
> Now that you've cleaned up Products.Five in Zope trunk, what should
> other packages that use ``makeClass`` and ``makeClassForTemplate``
> change to?
Well. I wasn't aware of the fact that other packages use these
constructors. Please let me know if you think additional BBB support is
needed.
> For five.formlib I simply exchanged ``makeClass`` for ``type`` and
> ``makeClassForTemplate`` for ``SimpleViewClass``, see:
> http://zope3.pov.lt/trac/changeset/127697/five.formlib/branches/zope-trunk-compat
>
> Would these changes be ok for packages that want to continue working
> with Zope 2.13?
AFAICS it's fine to use the ``type`` constructor instead of
``makeClass`` in Zope 2.13.
``SimpleViewClass`` is not available in Zope 2.13, so that part will not
work in Zope 2.13. ``makeClassForTemplate`` has a slightly different
signature, but the way five.formlib uses it should work with both
versions. So I would fall back to ``makeClassForTemplate`` if import of
``SimpleViewClass`` doesn't work.
HTH,
Yuppie
More information about the Zope-Dev
mailing list