[Distutils] comparison of configuration languages

Łukasz Langa lukasz at langa.pl
Sat May 7 16:42:59 EDT 2016


> On May 7, 2016, at 9:32 AM, Brett Cannon <brett at python.org> wrote:
> 
> On Sat, 7 May 2016 at 07:49 Nick Coghlan <ncoghlan at gmail.com <mailto:ncoghlan at gmail.com>> wrote:
> 
> On 7 May 2016 13:00, "Nathaniel Smith" <njs at pobox.com <mailto:njs at pobox.com>> wrote:
> >
> > Here's that one-stop writeup/comparison of all the major configuration
> > languages that I mentioned:
> >
> > https://gist.github.com/njsmith/78f68204c5d969f8c8bc645ef77d4a8f <https://gist.github.com/njsmith/78f68204c5d969f8c8bc645ef77d4a8f>
> Thanks for that, and "yikes" on the comment handling variations in ConfigParser - you can tell I've never even tried to use end-of-line comments in INI files, and apparently neither has anyone I've worked with :)
> 
> Yeah, that's pretty bad. :/ I checked when ConfigParser was added to Python and it's late 1997: https://hg.python.org/cpython/rev/5b24cbb1f99b <https://hg.python.org/cpython/rev/5b24cbb1f99b>, so rather old and predates our stricter code quality rules for additions to the stdlib.

Some context: treating just semicolons as inline comments was broken anyway as there were legitimate cases where people wanted to use semicolons inside values and it didn’t work. There were more examples of similar features with lurking edge cases. We’ve plowed through them with Fred in 2010 and so configparser in 3.2+ should have less surprising characteristics. Some things we sadly had to leave as they are due to unsolvable backwards compatibility issues.

We don’t have to consider using the legacy ConfigParser even for 2.7 compat at all as there is a backport of the new version which handles Unicode, etc. I know, it’s due a release, I’m on it. But what I’m saying is, for Python 2.7, we can and should just bundle the backport and be done with it. If there’s issues with it, let me know and yo I'll fix ‘em.

I was involved in standardizing TOML to some extent, seeing it as a clean way out from the undefined INI world. Unfortunately it doesn’t seem like it got very popular and the tooling around it is still lacking. This is why I’d still prefer YAML. Rust is depending on TOML already but that’s still very limited adoption and more cognitive churn for users. OTOH, us becoming serious TOML users might just change the landscape of its adoption…

--
Lukasz Langa | Facebook
Production Engineer | The Ministry of Silly Walks
(+1) 650-681-7811
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160507/95e960e7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160507/95e960e7/attachment.sig>


More information about the Distutils-SIG mailing list