Re: [Zope-dev] [Checkins] SVN: z3c.form/branches/icemac_compatibility/ - Made compatible with `zope.app.publisher` 3.8.2

2009-07-17 Thread Adam GROSZER
Hello Michael,

If possible please KEEP compatibility with KGS 3.4, it was a HUGE
fight to do it and I think most people don't want to live on the edge
of the trunk (yet).

Hint: there is
svn://svn.zope.org/repos/main/z3c.form/trunk/src/z3c/form/compatibility.py
There you can add compatibility code.


Friday, July 17, 2009, 6:44:08 PM, you wrote:

MH> Am 17.07.2009 um 18:24 schrieb Michael Howitz:
>> 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.

MH> The current trunk of z3c.form is not compatible with  
MH> zope.app.publisher 3.8.2 and above, as this version introduced an  
MH> absolute url adapter for resources. This adapter does not exist in  
MH> versions before 3.8.2. It returns a str instead of a unicode as  
MH> Resource.__call__ did before. (Relying on this feature seems to be bad
MH> anyway.)

MH> So my question is whether z3c.form 2.x still has to be compatible with
MH> KGS 3.4 of if we can break this compatibility to get compatible with  
MH> more recent versions of other packages.
MH> Trying to stay compatible requires at least some conditional code to  
MH> register the new absolute url adapter in the tests.

MH> Is there any buildbot which tests z3c.form against KGS 3.4 and above?

>>  - Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
>>missing test dependency on `zope.app.component`.

MH> This is necessary because zope.app.component no longer gets pulled in
MH> indirectly. But z3c.pt expects zope.app.component to be installed when
MH> zope.app.security is installed. (zope.app.security is a test  
MH> dependency needed by browser/README.txt)
MH> zope.app.component is even required for one test (browser/README.txt)
MH> of z3c.form.

>> 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.txt2009-07-17  
>> 16:22:39 UTC (rev 101966)
>> +++ z3c.form/branches/icemac_compatibility/CHANGES.txt2009-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.txt2009-07-17 16:22:39 UTC (rev 101966)
>> +++ z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
>> README.txt2009-07-17 16:24:27 UTC (rev 101967)
>> @@ -500,6 +50

Re: [Zope-dev] [Checkins] SVN: z3c.form/branches/icemac_compatibility/ - Made compatible with `zope.app.publisher` 3.8.2

2009-07-17 Thread Michael Howitz
Am 17.07.2009 um 18:24 schrieb Michael Howitz:
> 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.

The current trunk of z3c.form is not compatible with  
zope.app.publisher 3.8.2 and above, as this version introduced an  
absolute url adapter for resources. This adapter does not exist in  
versions before 3.8.2. It returns a str instead of a unicode as  
Resource.__call__ did before. (Relying on this feature seems to be bad  
anyway.)

So my question is whether z3c.form 2.x still has to be compatible with  
KGS 3.4 of if we can break this compatibility to get compatible with  
more recent versions of other packages.
Trying to stay compatible requires at least some conditional code to  
register the new absolute url adapter in the tests.

Is there any buildbot which tests z3c.form against KGS 3.4 and above?

>  - Fixed tests to run with `z3c.pt` 1.0b17 (and above) by adding a
>missing test dependency on `zope.app.component`.

This is necessary because zope.app.component no longer gets pulled in  
indirectly. But z3c.pt expects zope.app.component to be installed when  
zope.app.security is installed. (zope.app.security is a test  
dependency needed by browser/README.txt)
zope.app.component is even required for one test (browser/README.txt)  
of z3c.form.

> 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.txt2009-07-17  
> 16:22:39 UTC (rev 101966)
> +++ z3c.form/branches/icemac_compatibility/CHANGES.txt2009-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.txt2009-07-17 16:22:39 UTC (rev 101966)
> +++ z3c.form/branches/icemac_compatibility/src/z3c/form/browser/ 
> README.txt2009-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.IAbsol