<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 7, 2016 at 4:05 PM, Robert Collins <span dir="ltr"><<a href="mailto:robertc@robertcollins.net" target="_blank">robertc@robertcollins.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Couple thoughts.<br>
<br>
Firstly, the human-editable bit: who in the last *decade* has been<br>
writing code using a non-syntax-aware/helping editor? Its a supremely<br>
uninteresting aspect IMO.<br>
<br>
On ConfigParser - yes, its horrid. OTOH we do get all the lines<br>
reliably, and setuptools will need to cover the unicode aspect itself<br>
in its own time. All we need to do is permit # inline as a comment -<br>
line a requirements.txt file for pip - and it becomes trivial to parse<br>
in all cases that we need *now*.<br></blockquote><div><br></div><div>ConfigObj is read/write with full Unicode support (and type validation)</div><div><br></div><div><br></div><div>| Src: <a href="https://github.com/DiffSK/configobj">https://github.com/DiffSK/configobj</a></div><div><div>| PyPI: <a href="https://pypi.python.org/pypi/configobj/5.0.6">https://pypi.python.org/pypi/configobj/5.0.6</a><br></div><div>| Docs: <a href="https://configobj.readthedocs.io/en/latest/">https://configobj.readthedocs.io/en/latest/</a></div></div><div><br></div><div><b>Having read/write support avoids the primary issue (injection) with templating config files</b></div><div><br></div><div>From <a href="https://github.com/DiffSK/configobj/blob/master/setup.py">https://github.com/DiffSK/configobj/blob/master/setup.py</a></div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">LONG_DESCRIPTION = """**ConfigObj** is a simple but powerful config file reader and writer: an *ini
file round tripper*. Its main feature is that it is very easy to use, with a
straightforward programmer's interface and a simple syntax for config files.
It has lots of other features though :
* Nested sections (subsections), to any level
* List values
* Multiple line values
* Full Unicode support
* String interpolation (substitution)
* Integrated with a powerful validation system
- including automatic type checking/conversion
- and allowing default values
- repeated sections
* All comments in the file are preserved
* The order of keys/sections is preserved
* Powerful ``unrepr`` mode for storing/retrieving Python data-types</pre></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Either we are defining the long term thing now, in which case that<br>
huge pile of complexity lands on us, and we have to get everything<br>
right.<br>
<br>
Or we are defining a thing which solves the present bug, and as long<br>
as we make sure it does not bind us in future, we're not hamstrung.<br>
<br>
E.g. use setup.cfg now. Add pybuild.toml later. (btw, terrible name,<br>
as pybuild is a thing in the debian space, and this will confuse the<br>
heck out of folk). <a href="https://wiki.debian.org/Python/Pybuild" rel="noreferrer" target="_blank">https://wiki.debian.org/Python/Pybuild</a><br>
<br>
<br>
-Rob<br>
<span class=""><font color="#888888"><br>
<br>
<br>
--<br>
Robert Collins <<a href="mailto:rbtcollins@hpe.com">rbtcollins@hpe.com</a>><br>
Distinguished Technologist<br>
HP Converged Cloud<br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</div></div></blockquote></div><br></div></div>