Hi,

Zagy and I are trying to make z3c.form compatible with sources. We had
to investigate zope.schema for that and found the mess of vocabularies
and sources that is still around. 

Here are some facts we found:

- The Choice field has an attribute `vocabulary` which it says to be an
  'IBaseVocabulary' object.

- Reading the code of the choice field turns out that the actual
  contract is an 'ISource'.

- Most client code working against the `vocabulary` attribute actually
  assumes it to be an IIterableVocabulary.

- The vocabulary code is badly entangled and mixes up concepts that
  sources get right.

- Widgets for the choice field have to react differently to sources and
  vocabularies.

We think:

- The contract for the `vocabulary` attribute should be ISource.

- Client code (e.g. a widget) should adapt the generic source it gets to
  a more specific and richer interface like IIterableSource.

- Widgets for the choice field shouldn't have to care for two different
  things that the source could be.

- Vocabularies ought to die. 

Conclusion:

We'd love to remove all traces of vocabularies from zope.schema and it
more clear how to use sources.

As deprecation has fallen out of favor, we wonder how to get rid of
vocabularies. We definitely do not want to fork zope.schema. Would a
sufficiently newer version (3.5, 4?) rectify breaking something in this
way?

I estimate that providing BBB is going to be a real pain. :/

Christian

-- 
gocept gmbh & co. kg - forsterstrasse 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to