[Zope3-checkins] SVN: Zope3/trunk/src/zope/schema/_field.py Changed
choice fields to verify that a verify that
Jim Fulton
jim at zope.com
Tue Jun 21 06:28:34 EDT 2005
Log message for revision 30874:
Changed choice fields to verify that a verify that
a vocabulary object provides IBaseVocabulary, rather than
IVocabulary. IBaseVocabulary is all that is absolutely needed
to specifu a field, although more would be needed for an
input widget.
Changed:
U Zope3/trunk/src/zope/schema/_field.py
-=-
Modified: Zope3/trunk/src/zope/schema/_field.py
===================================================================
--- Zope3/trunk/src/zope/schema/_field.py 2005-06-21 10:28:32 UTC (rev 30873)
+++ Zope3/trunk/src/zope/schema/_field.py 2005-06-21 10:28:34 UTC (rev 30874)
@@ -33,7 +33,7 @@
from zope.schema.interfaces import IChoice, ITuple, IList, ISet, IDict
from zope.schema.interfaces import IPassword, IObject, IDate, ITimedelta
from zope.schema.interfaces import IURI, IId, IFromUnicode
-from zope.schema.interfaces import ISource, IVocabulary
+from zope.schema.interfaces import ISource, IBaseVocabulary
from zope.schema.interfaces import ValidationError, InvalidValue
from zope.schema.interfaces import WrongType, WrongContainedType, NotUnique
@@ -184,7 +184,7 @@
"""Initialize object."""
if vocabulary is not None:
assert (isinstance(vocabulary, basestring)
- or IVocabulary.providedBy(vocabulary))
+ or IBaseVocabulary.providedBy(vocabulary))
assert source is None, (
"You cannot specify both source and vocabulary.")
elif source is not None:
More information about the Zope3-Checkins
mailing list