[Zope-dev] zc.buildout, substitution and templating
Encolpe Degoute
encolpe.degoute at free.fr
Sat Sep 12 09:03:50 EDT 2009
Thomas Lotze a écrit :
> Encolpe Degoute wrote:
>
>> As zc.buildout is using something near string.template I patched
>> gocept.recipe.env to replace '$' by '$$' and collective.recipe.template to
>> replace '$$' by '$'.
>
> For the record: gocept.recipe.env hasn't yet been patched; I'd rather
> discuss the issue first before applying your patch.
>
>> As _sub method in builout just split text around '$$' and join it again
>> with '$$' we need to make the replacement with the result of this
>> method.
>>
>> Is it the good way to deal with escaping data ? Or is this a bug of
>> zc.buildout ?
>
> I think it's a bug in zc.buildout if it cannot read the configuration
> storage it wrote earlier itself. A good API for dealing with configuration
> options shouldn't require client code such as recipes to care about
> encoding and decoding values in order to work around the details of
> buildout's option representation. This would be awkward and, as we can see
> with the issue at hand, would only work if all client code handled the
> encoding consistently.
I'm agree.
> I therefore propose fixing buildout so that it encodes option values when
> writing .installed.cfg just as it would decode them when reading the file.
No opposition on this ?
Can I add it in the trunk or does anybody want a branch ?
Regards
--
Encolpe DEGOUTE
http://encolpe.degoute.free.fr/
Logiciels libres, hockey sur glace et autres activités cérébrales
More information about the Zope-Dev
mailing list