[Checkins] SVN: zope.app.form/trunk/ Make compatible with upcoming zope.schema release.

Christian Theune ct at gocept.com
Fri Jan 30 11:47:05 EST 2009


Log message for revision 95589:
  Make compatible with upcoming zope.schema release.
  

Changed:
  U   zope.app.form/trunk/CHANGES.txt
  U   zope.app.form/trunk/setup.py
  U   zope.app.form/trunk/src/zope/app/form/browser/itemswidgets.py
  U   zope.app.form/trunk/src/zope/app/form/browser/source.txt
  U   zope.app.form/trunk/src/zope/app/form/browser/widget.py
  U   zope.app.form/trunk/src/zope/app/form/ftesting.zcml

-=-
Modified: zope.app.form/trunk/CHANGES.txt
===================================================================
--- zope.app.form/trunk/CHANGES.txt	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/CHANGES.txt	2009-01-30 16:47:05 UTC (rev 95589)
@@ -2,10 +2,11 @@
 CHANGES
 =======
 
-3.7.0dev (unreleased)
+3.7.1dev (unreleased)
 =====================
 
-- ...
+- Adapt to the upcoming zope.schema release 3.5.1 which will also silence the
+  spurious `set` failures.
 
 3.7.0 (2008-12-11)
 ==================

Modified: zope.app.form/trunk/setup.py
===================================================================
--- zope.app.form/trunk/setup.py	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/setup.py	2009-01-30 16:47:05 UTC (rev 95589)
@@ -78,7 +78,7 @@
           "zope.interface",
           "zope.proxy",
           "zope.publisher",
-          "zope.schema>=3.5a1",
+          "zope.schema>=3.5.1dev",
           "zope.security",
           "zope.app.basicskin",
           "zope.location",

Modified: zope.app.form/trunk/src/zope/app/form/browser/itemswidgets.py
===================================================================
--- zope.app.form/trunk/src/zope/app/form/browser/itemswidgets.py	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/src/zope/app/form/browser/itemswidgets.py	2009-01-30 16:47:05 UTC (rev 95589)
@@ -16,7 +16,6 @@
 $Id$
 """
 __docformat__ = 'restructuredtext'
-import sets
 from xml.sax.saxutils import escape
 
 from zope import component
@@ -544,7 +543,7 @@
     def _toFieldValue(self, input):
         value = super(MultiSelectSetWidget, self)._toFieldValue(input)
         if isinstance(value, list):
-            value = sets.Set(value)
+            value = set(value)
         return value
 
 

Modified: zope.app.form/trunk/src/zope/app/form/browser/source.txt
===================================================================
--- zope.app.form/trunk/src/zope/app/form/browser/source.txt	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/src/zope/app/form/browser/source.txt	2009-01-30 16:47:05 UTC (rev 95589)
@@ -432,7 +432,6 @@
   ...     )
   ... )
   >>> dogSet = dogSet.bind(object()) # give the field a context
-  >>> from sets import Set
   >>> request = TestRequest()
   >>> widget = zope.app.form.browser.source.SourceMultiSelectSetWidget(
   ...     dogSet, dogSource, request)

Modified: zope.app.form/trunk/src/zope/app/form/browser/widget.py
===================================================================
--- zope.app.form/trunk/src/zope/app/form/browser/widget.py	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/src/zope/app/form/browser/widget.py	2009-01-30 16:47:05 UTC (rev 95589)
@@ -203,7 +203,7 @@
 
         >>> widget.getInputValue()
         Traceback (most recent call last):
-        WidgetInputError: ('foo', u'Foo', bye world)
+        WidgetInputError: ('foo', u'Foo', ConstraintNotSatisfied(u'bye world'))
 
     Simple input widgets require that input be available in the form request.
     If input is not present, a ``MissingInputError`` is raised:
@@ -233,7 +233,7 @@
         >>> field.required = True
         >>> widget.getInputValue()
         Traceback (most recent call last):
-        WidgetInputError: ('foo', u'Foo', )
+        WidgetInputError: ('foo', u'Foo', RequiredMissing())
 
     However, if the field is not required, the empty string will be converted
     by the widget into the field's `missing_value` and read as a legal field

Modified: zope.app.form/trunk/src/zope/app/form/ftesting.zcml
===================================================================
--- zope.app.form/trunk/src/zope/app/form/ftesting.zcml	2009-01-30 16:44:00 UTC (rev 95588)
+++ zope.app.form/trunk/src/zope/app/form/ftesting.zcml	2009-01-30 16:47:05 UTC (rev 95589)
@@ -7,6 +7,7 @@
   <!-- This file is the equivalent of site.zcml and it is -->
   <!-- used for functional testing setup -->
 
+  <include package="zope.security" file="meta.zcml" />
 
   <include package="zope.app.zcmlfiles" />
   <include package="zope.app.form.browser.tests" file="i18n.zcml" />



More information about the Checkins mailing list