[Checkins] SVN: z3c.form/branches/icemac_compatibility/ - Made compatible with `zope.app.publisher` 3.8.2 (and above) by using
Michael Howitz
mh at gocept.com
Fri Jul 17 12:24:27 EDT 2009
Log message for revision 101967:
- Made compatible with `zope.app.publisher` 3.8.2 (and above) by using
the new absolute url adapter for resources introduced in 3.8.2.
- Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
missing test dependency on `zope.app.component`.
Changed:
U z3c.form/branches/icemac_compatibility/CHANGES.txt
U z3c.form/branches/icemac_compatibility/buildout.cfg
U z3c.form/branches/icemac_compatibility/setup.py
U z3c.form/branches/icemac_compatibility/src/z3c/form/browser/README.txt
U z3c.form/branches/icemac_compatibility/src/z3c/form/browser/image.py
U z3c.form/branches/icemac_compatibility/src/z3c/form/button.py
U z3c.form/branches/icemac_compatibility/src/z3c/form/button.txt
-=-
Modified: z3c.form/branches/icemac_compatibility/CHANGES.txt
===================================================================
--- z3c.form/branches/icemac_compatibility/CHANGES.txt 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/CHANGES.txt 2009-07-17 16:24:27 UTC (rev 101967)
@@ -12,6 +12,13 @@
manager is only registered for dict, because it would otherwise get
picked up in undesired scenarios.
+- Made compatible with `zope.app.publisher` 3.8.2 (and above) by using
+ the new absolute url adapter for resources introduced in 3.8.2.
+
+- Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
+ missing test dependency on `zope.app.component`.
+
+
Version 2.0.0 (2009-06-14)
--------------------------
Modified: z3c.form/branches/icemac_compatibility/buildout.cfg
===================================================================
--- z3c.form/branches/icemac_compatibility/buildout.cfg 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/buildout.cfg 2009-07-17 16:24:27 UTC (rev 101967)
@@ -2,7 +2,12 @@
develop = . benchmark
parts = test test-no-z3cpt checker coverage-test coverage-report docs i18n
benchmark python
+versions = versions
+[versions]
+zope.app.publisher = 3.8.3
+z3c.pt = 1.0.0
+
[test-environment]
CHAMELEON_DEBUG = False
CHAMELEON_CACHE = False
Modified: z3c.form/branches/icemac_compatibility/setup.py
===================================================================
--- z3c.form/branches/icemac_compatibility/setup.py 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/setup.py 2009-07-17 16:24:27 UTC (rev 101967)
@@ -91,6 +91,8 @@
'zope.app.testing',
'zope.container',
'zope.testing',
+ 'zope.app.component', # required by z3c.pt from 1.0b17 on
+ # also required by our browser/README.txt
],
adding = ['zope.app.container'],
docs = ['z3c.recipe.sphinxdoc'],
Modified: z3c.form/branches/icemac_compatibility/src/z3c/form/browser/README.txt
===================================================================
--- z3c.form/branches/icemac_compatibility/src/z3c/form/browser/README.txt 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/src/z3c/form/browser/README.txt 2009-07-17 16:24:27 UTC (rev 101967)
@@ -500,6 +500,14 @@
>>> zope.component.provideAdapter(
... resource, (None, None), ITraversable, name="resource")
+ # Register resource absolute url adapter
+ >>> import zope.app.publisher.browser.resource
+ >>> from zope.app.publisher.interfaces import IResource
+ >>> import zope.traversing.browser.interfaces
+ >>> zope.component.provideAdapter(
+ ... zope.app.publisher.browser.resource.AbsoluteURL, (IResource, None),
+ ... zope.traversing.browser.interfaces.IAbsoluteURL)
+
# Register the "pressme.png" resource
>>> from zope.app.publisher.browser.resource import Resource
>>> testing.browserResource('pressme.png', Resource)
Modified: z3c.form/branches/icemac_compatibility/src/z3c/form/browser/image.py
===================================================================
--- z3c.form/branches/icemac_compatibility/src/z3c/form/browser/image.py 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/src/z3c/form/browser/image.py 2009-07-17 16:24:27 UTC (rev 101967)
@@ -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/branches/icemac_compatibility/src/z3c/form/button.py
===================================================================
--- z3c.form/branches/icemac_compatibility/src/z3c/form/button.py 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/src/z3c/form/button.py 2009-07-17 16:24:27 UTC (rev 101967)
@@ -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/branches/icemac_compatibility/src/z3c/form/button.txt
===================================================================
--- z3c.form/branches/icemac_compatibility/src/z3c/form/button.txt 2009-07-17 16:22:39 UTC (rev 101966)
+++ z3c.form/branches/icemac_compatibility/src/z3c/form/button.txt 2009-07-17 16:24:27 UTC (rev 101967)
@@ -644,6 +644,14 @@
>>> zope.component.provideAdapter(
... resource, (None, None), ITraversable, name="resource")
+ # Register resource absolute url adapter
+ >>> import zope.app.publisher.browser.resource
+ >>> from zope.app.publisher.interfaces import IResource
+ >>> import zope.traversing.browser.interfaces
+ >>> zope.component.provideAdapter(
+ ... zope.app.publisher.browser.resource.AbsoluteURL, (IResource, None),
+ ... zope.traversing.browser.interfaces.IAbsoluteURL)
+
# 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