[Checkins] SVN: Products.GenericSetup/trunk/Products/GenericSetup/ Fixed component handler to use 'for' not 'for_' in adapter directive. To support import of existing profiles 'for_' is used as a fallback.
Laurence Rowe
l at lrowe.co.uk
Sat Sep 19 06:43:51 EDT 2009
This is tested in r104356
2009/9/19 Wichert Akkerman <wichert at wiggy.net>:
> Can you add a test for this change?
>
>
> On 2009-9-18 17:27, Laurence Rowe wrote:
>>
>> Log message for revision 104347:
>> Fixed component handler to use 'for' not 'for_' in adapter directive. To
>> support import of existing profiles 'for_' is used as a fallback.
>>
>> Changed:
>> U Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
>> U Products.GenericSetup/trunk/Products/GenericSetup/components.py
>>
>> -=-
>> Modified: Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
>> ===================================================================
>> --- Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
>> 2009-09-18 15:18:53 UTC (rev 104346)
>> +++ Products.GenericSetup/trunk/Products/GenericSetup/CHANGES.txt
>> 2009-09-18 15:27:38 UTC (rev 104347)
>> @@ -4,6 +4,9 @@
>> GenericSetup 1.5.0 (unreleased)
>> -------------------------------
>>
>> +- Fixed component handler to use 'for' not 'for_' in adapter directive.
>> To
>> + support import of existing profiles 'for_' is used as a fallback.
>> +
>> - Changed testing.py to directly load zope.traversing's ZCML instead of
>> going
>> via the Five traversing.zcml BBB shim.
>>
>>
>> Modified: Products.GenericSetup/trunk/Products/GenericSetup/components.py
>> ===================================================================
>> --- Products.GenericSetup/trunk/Products/GenericSetup/components.py
>> 2009-09-18 15:18:53 UTC (rev 104346)
>> +++ Products.GenericSetup/trunk/Products/GenericSetup/components.py
>> 2009-09-18 15:27:38 UTC (rev 104347)
>> @@ -132,11 +132,10 @@
>> provided = _resolveDottedName(provided)
>> name = unicode(str(child.getAttribute('name')))
>>
>> - for_ = child.getAttribute('for_')
>> + for_ = child.getAttribute('for') or
>> child.getAttribute('for_') #BBB
>> required = []
>> - for interface in for_.split(u' '):
>> - if interface:
>> - required.append(_resolveDottedName(interface))
>> + for interface in for_.split():
>> + required.append(_resolveDottedName(interface))
>>
>> self.context.registerAdapter(factory,
>> required=required,
>> @@ -269,7 +268,7 @@
>>
>> child.setAttribute('factory', reg_info['factory'])
>> child.setAttribute('provides', reg_info['provided'])
>> - child.setAttribute('for_', for_.strip())
>> + child.setAttribute('for', for_.strip())
>> if reg_info['name']:
>> child.setAttribute('name', reg_info['name'])
>>
>>
>> _______________________________________________
>> checkins mailing list
>> checkins at zope.org
>> https://mail.zope.org/mailman/listinfo/checkins
>
>
> --
> Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
> http://www.wiggy.net/ It is hard to make things simple.
>
More information about the checkins
mailing list