Charlie Clark wrote:
> Am 30.09.2011, 10:55 Uhr, schrieb yuppie<y.2...@wcm-solutions.de>:
>> AFAICS only the getUpdateBase method of ISyndicationTool needs to be
>> backwards compatible. Everything else is new API or doesn't return
>> DateTime objects. Wouldn't it be better to use datetime internally? You
>> already need an upgrade step for SyndicationInformation. Writing an
>> additional upgrade step for SyndicationTool wouldn't be much extra work.
> ISyndicationInfo is a new interface. I'm tempted to use zope.schema
> directly on this but I suppose that does tie any implementation to
> zope.schema rather maybe annotated Python tyes. Thoughts?
I think in general it's fine to use zope.schema for CMFCore interfaces.
But if you use properties instead of separate accessors and mutators,
you can't set different read/write permissions in Zope 2. So please make
sure modifying the settings is protected sufficiently.
> Regarding zope.annotation - IAttributeAnnotatable creates a new object
> within the folder
Why do you think so? AFAICS the default implementation stores all
annotations in the __annotations__ attribute.
> but I'd rather not have the SyndicationInfo visible
> within the ZMI but IAnnotations only uses a dictionary and so less
> suitable for storing multiple values. If I go the AttributeAnnotatable way
> is it okay to use Persistent rather than SimpleItem as long as
> manage_fixupOwnershiAafterAdd is provided? Or is that too kludgy and
> preferable to work on my current adapter to provide attribute access to an
> Annotations dictionary?
Zope-CMF maillist - Zope-CMF@zope.org
See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests