[Python-Dev] Draft PEP on RSON configuration file format

Patrick Maupin pmaupin at gmail.com
Mon Mar 1 03:33:05 CET 2010


On Sun, Feb 28, 2010 at 7:51 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Well, a constructive approach would involve approaching projects
> which have devised their own formats, so as to know what kind of
> unified format they would be likely to accept (or not).

Trying to poll "selected projects which have configuration files" may
or may not be a constructive approach.  Most projects which have
predefined formats are unlikely to change, unless there is
standardization on a new format.  It is very much a chicken and egg
problem, although I agree with (and have implemented) the suggestion
that I discuss this on python-list.

Having said that, one of the reasons I wrote the PEP and am working on
a parser is because of a few projects I use and/or am personally
involved in.  For example, rst2pdf stylesheets are in JSON, e.g.

http://rst2pdf.googlecode.com/svn/trunk/rst2pdf/styles/styles.json

Now, we're all programmers here, and we can read this, and can even
modify it, but it is easy to get wrong, and very verbose with lots of
syntax gotchas.  For example, unlike Python, JSON won't even let you
have a trailing comma.

But JSON *is* a great format, and RSON (like YAML) is designed to
parse properly formatted JSON, so the goal is that any project which
uses JSON could use RSON as a drop-in replacement, and then update its
configuration data.

Of course, it is extremely easy (hence your yawn) to create a new
configuration format, even if it is specified that it is upwards
compatible with JSON.  The trick is to create the *correct* new
format, that at least some people can agree on.

In order to do this, I have chosen to poll, not preexisting projects,
which have entrenched configuration data and a reluctance to change,
but brand new projects which haven't been invented yet.  Many of the
inventors of those projects hang out on python-dev, so this seemed
like a reasonable place to do polling.

As I tried to make clear, I will not be too disappointed if I do not
come up with something worthy of the standard library for a long time
(if ever), but the PEP process is very valuable, and I would like to
start off on the right foot by soliciting feedback before I do too
much coding.

Sorry if it feels like spam; this is my last message on the matter
until and unless somebody wants to constructively discuss the actual
contents of the PEP.  Please feel free to email me privately if you
don't want to clutter up this list.

Thanks and best regards,
Pat


More information about the Python-Dev mailing list