[Checkins] SVN: z3c.form/trunk/ - Bug: Updated code to pass all tests on the latest package versions.
Stephan Richter
srichter at gmail.com
Wed Jul 22 23:07:19 EDT 2009
Log message for revision 102101:
- Bug: Updated code to pass all tests on the latest package versions.
Man, those API changes are subtle!!!! This really sucks!
Changed:
U z3c.form/trunk/CHANGES.txt
U z3c.form/trunk/src/z3c/form/browser/README.txt
U z3c.form/trunk/src/z3c/form/browser/image.py
U z3c.form/trunk/src/z3c/form/button.py
U z3c.form/trunk/src/z3c/form/button.txt
-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt 2009-07-23 03:06:35 UTC (rev 102100)
+++ z3c.form/trunk/CHANGES.txt 2009-07-23 03:07:19 UTC (rev 102101)
@@ -12,9 +12,13 @@
manager is only registered for dict, because it would otherwise get
picked up in undesired scenarios.
+- Bug: Updated code to pass all tests on the latest package versions.
+
- Bug: Completed the Zope 3.4 backwards-compatibility. Also created a buidlout
configuration file to test the Zope 3.4 compatibility. Note: You *must* use
- the 'latest' or 'zope34' extra now to get all required packages.
+ the 'latest' or 'zope34' extra now to get all required
+ packages. Alternatively, you can specify the packages listed in either of
+ those extras explicitely in your product's required packages.
Version 2.0.0 (2009-06-14)
Modified: z3c.form/trunk/src/z3c/form/browser/README.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/browser/README.txt 2009-07-23 03:06:35 UTC (rev 102100)
+++ z3c.form/trunk/src/z3c/form/browser/README.txt 2009-07-23 03:07:19 UTC (rev 102101)
@@ -500,6 +500,12 @@
>>> zope.component.provideAdapter(
... resource, (None, None), ITraversable, name="resource")
+ # New absolute URL adapter for resources, if available
+ >>> import zope.app.publisher.browser.resource
+ >>> if hasattr(zope.app.publisher.browser.resource, 'AbsoluteURL'):
+ ... zope.component.provideAdapter(
+ ... zope.app.publisher.browser.resource.AbsoluteURL)
+
# Register the "pressme.png" resource
>>> from zope.app.publisher.browser.resource import Resource
>>> testing.browserResource('pressme.png', Resource)
Modified: z3c.form/trunk/src/z3c/form/browser/image.py
===================================================================
--- z3c.form/trunk/src/z3c/form/browser/image.py 2009-07-23 03:06:35 UTC (rev 102100)
+++ z3c.form/trunk/src/z3c/form/browser/image.py 2009-07-23 03:07:19 UTC (rev 102101)
@@ -51,6 +51,6 @@
image.value = field.title
# Get the full resource URL for the image:
site = hooks.getSite()
- image.src = zope.traversing.api.traverse(
- site, '++resource++' + field.image, request=request)()
+ image.src = unicode(zope.traversing.api.traverse(
+ site, '++resource++' + field.image, request=request)())
return image
Modified: z3c.form/trunk/src/z3c/form/button.py
===================================================================
--- z3c.form/trunk/src/z3c/form/button.py 2009-07-23 03:06:35 UTC (rev 102100)
+++ z3c.form/trunk/src/z3c/form/button.py 2009-07-23 03:07:19 UTC (rev 102101)
@@ -234,8 +234,8 @@
@property
def src(self):
site = hooks.getSite()
- src = zope.traversing.api.traverse(
- site, '++resource++' + self.field.image, request=self.request)()
+ src = unicode(zope.traversing.api.traverse(
+ site, '++resource++' + self.field.image, request=self.request)())
return src
def isExecuted(self):
Modified: z3c.form/trunk/src/z3c/form/button.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/button.txt 2009-07-23 03:06:35 UTC (rev 102100)
+++ z3c.form/trunk/src/z3c/form/button.txt 2009-07-23 03:07:19 UTC (rev 102101)
@@ -644,6 +644,12 @@
>>> zope.component.provideAdapter(
... resource, (None, None), ITraversable, name="resource")
+ # New absolute URL adapter for resources, if available
+ >>> import zope.app.publisher.browser.resource
+ >>> if hasattr(zope.app.publisher.browser.resource, 'AbsoluteURL'):
+ ... zope.component.provideAdapter(
+ ... zope.app.publisher.browser.resource.AbsoluteURL)
+
# Register the "submit.png" resource
>>> from zope.app.publisher.browser.resource import Resource
>>> testing.browserResource('submit.png', Resource)
More information about the Checkins
mailing list