Re: [Server-devel] xs-activation and OS update info
2009/10/27 Martin Langhoff martin.langh...@gmail.com: Right... makes sense. I am a bit intrigued with the custom config file parser / writer (that is 3x the sloc of the whole xs-activation ;-) ). It's not really a custom config file parser. It's a trivial change to Python's own ConfigParser class. The only change is in the constructor IIRC, which now lets you use a custom dictionary type. I am guessing the key motivator is that YAML, JSON and other config formats won't preserve ordering correctly, right? I didn't feel that JSON is appropriate for a config file, especially so in oatslite (which allows more per-OS configuration). I don't know anything about YAML. - is MyConfigParser used anywhere else? I don't understand this question. My patch only adds it for xs-activation purposes. - odict is only needed on F9, correct? It is needed up until Python 3.0, unless you know of a python ordered dictionary class which is shipped with your distro-of-choice. (I don't know of any, meaning that it will still be needed even with F12) It's a bit ugly with these 2 classes but at least their importance is trivial to explain and they can sit independently, and we have a path for getting rid of them (Python 3.0). What is needed in terms of config parsing is pretty simple -- I suspect there are a couple of simple ways we could avoid depending on the ordering of the config file, with less code. Alternative implementations/suggestions welcome :) In my opinion the ordering is the main purpose of having to use a config file here. Daniel ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] xs-activation and OS update info
On Thu, Oct 29, 2009 at 5:09 PM, Daniel Drake d...@laptop.org wrote: I don't understand this question. My patch only adds it for xs-activation purposes. It is about avoiding maintaining a bespoke lib. If you say it is a variant on a python standard lib, do you think we can subclass it? Or is there a reason not to? It is needed up until Python 3.0, unless you know of a python ordered I saw a commend mentioning that something wouldn't be needed w 2.6. On F11 we have 2.6... but maybe I misunderstood. Alternative implementations/suggestions welcome :) hmmm. I'll see... m -- martin.langh...@gmail.com mar...@laptop.org -- School Server Architect - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel
Re: [Server-devel] xs-activation and OS update info
2009/10/30 Martin Langhoff martin.langh...@gmail.com: It is about avoiding maintaining a bespoke lib. If you say it is a variant on a python standard lib, do you think we can subclass it? Or is there a reason not to? Yeah it can probably be subclassed. It is needed up until Python 3.0, unless you know of a python ordered I saw a commend mentioning that something wouldn't be needed w 2.6. On F11 we have 2.6... but maybe I misunderstood. Ah yes, I forgot the specifics. odict is needed until Python 3.0, but Python 2.6 adds the dict_type constructor parameter for ConfigParser so MyConfigParser is not needed with python 2.6. Daniel ___ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel