zope.schema.interfaces tells a few lies

Bug #340346 reported by Martin Aspeli
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.schema
Won't Fix
Undecided
Unassigned

Bug Description

I've been working on a package, plone.supermodel, which can serialize and de-serialize schema fields to/from XML. To do so, it looks at the interfaces describing a particular field to determine which attributes the field supports, relying on the self-describing nature of zope.schema.

Unfortunately, there are a few errors and omissions that would be nice to rectify:

 - The DottedName field does not have an interface. Thus, the min_dots and max_dots properties are not described anywhere.

 - IChoice omits to mention vocabularyName, which should be a TextLine

 - IChoice says 'vocabulary' is an Attribute. It should be an IObject(schema=ISource), I think, but Choice fields are a bit tricky.

 - ICollection specifies value_type as a Field. It should probably be an Object(schema=IField)

 - IDict specifies key_type and value_type as plain Attribute's. Again, they should be Object(schema=IField)s

Revision history for this message
Dan Korostelev (nadako) wrote :

Fix partially committed in 97796 and 97797

Changed in zope3:
status: New → In Progress
Tres Seaver (tseaver)
Changed in zope.schema:
status: New → In Progress
Changed in zope3:
status: In Progress → Won't Fix
Revision history for this message
Tres Seaver (tseaver) wrote :
Changed in zope.schema:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.