|
From: Stefan P. <sap...@gm...> - 2011-01-05 14:26:17
|
Hi all, I created a clone of ConfigObj on Google Code (http://code.google.com/r/pafcu-configobj/) where I will put any fixes and improvements to ConfigObj and Validator that I can come up with. Right now the only thing I have added is an improved list syntax allowing you to specify what type list members should have. You can also specify whether a tuple or list should be used. Now you can e.g. define a tuple containing ints between 1 and 10 by doing mylist = list(type="integer(min=1, max=10)", is_tuple=True) This should also work for custom types. In theory we could now get rid of all the XXX_list types, but for backwards compatibility I have left them in for now. They are a convinient short-hand notation, but at the very lest they should be renamed so they match their corresponding non-list type (e.g. rename int_list -> integer_list OR integer -> int). I also left in the top-level is_list() and is_tuple() functions which have the old behaviour for backwards compatibility. Old tests are passed and I added some new ones to check that the new syntax also works as expected. -- Stefan Parviainen |
|
From: Michael F. <fuz...@vo...> - 2011-01-05 18:28:30
|
On 05/01/2011 14:26, Stefan Parviainen wrote: > Hi all, > > I created a clone of ConfigObj on Google Code > (http://code.google.com/r/pafcu-configobj/) where I will put any fixes > and improvements to ConfigObj and Validator that I can come up with. > Right now the only thing I have added is an improved list syntax > allowing you to specify what type list members should have. You can > also specify whether a tuple or list should be used. > Cool. When you're happy with what you've done could you create an issue on the configobj issue tracker and attach a patch please. https://code.google.com/p/configobj/issues/list All the best, Michael Foord > Now you can e.g. define a tuple containing ints between 1 and 10 by doing > > mylist = list(type="integer(min=1, max=10)", is_tuple=True) > > This should also work for custom types. > > In theory we could now get rid of all the XXX_list types, but for > backwards compatibility I have left them in for now. They are a > convinient short-hand notation, but at the very lest they should be > renamed so they match their corresponding non-list type (e.g. rename > int_list -> integer_list OR integer -> int). I also left in the > top-level is_list() and is_tuple() functions which have the old > behaviour for backwards compatibility. > > Old tests are passed and I added some new ones to check that the new > syntax also works as expected. > -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html |
|
From: Stefan P. <pa...@ik...> - 2011-01-05 18:49:05
|
On Wed, Jan 5, 2011 at 8:28 PM, Michael Foord <fuz...@vo...> wrote: >> I created a clone of ConfigObj on Google Code >> (http://code.google.com/r/pafcu-configobj/) where I will put any fixes >> and improvements to ConfigObj and Validator that I can come up with. > Cool. When you're happy with what you've done could you create an issue > on the configobj issue tracker and attach a patch please. Personally I prefer the distributed workflow most projects seem to be switching to: "Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers." (From the Google Code Docs). But I guess patches to the issue tracker is OK too. I'm pretty happy with the lists now (it was a pretty minor thing to fix) and I also fixed issues #20, #24, #25, and #27 (added tests for these + fixed some of the old tests). I'll see when I have time to put together some patches. In the meantime anyone who wants to test this can just pull the changes from my repository. -- Stefan Parviainen |
|
From: Michael F. <fuz...@vo...> - 2011-01-06 12:22:50
|
On 05/01/2011 18:48, Stefan Parviainen wrote: > On Wed, Jan 5, 2011 at 8:28 PM, Michael Foord<fuz...@vo...> wrote: >>> I created a clone of ConfigObj on Google Code >>> (http://code.google.com/r/pafcu-configobj/) where I will put any fixes >>> and improvements to ConfigObj and Validator that I can come up with. >> Cool. When you're happy with what you've done could you create an issue >> on the configobj issue tracker and attach a patch please. > Personally I prefer the distributed workflow most projects seem to be > switching to: > "Because mercurial is a distributed (peer-to-peer) version control > system, it excels at branching and merging. If the project maintainers > like the new code, they just "pull" the changesets from the clone and > merge them into an official project repository. It's all much more > elegant than emailing patches back and forth, anonymous contributors > get to use the same tools as core developers." (From the Google Code > Docs). But I guess patches to the issue tracker is OK too. > > I'm pretty happy with the lists now (it was a pretty minor thing to > fix) and I also fixed issues #20, #24, #25, and #27 (added tests for > these + fixed some of the old tests). I'll see when I have time to put > together some patches. In the meantime anyone who wants to test this > can just pull the changes from my repository. > Ok, I can pull the changes from your repo instead of needing patches. Can you add a note to the relevant issues with the project / repo url. That will help when I come to look through the issues. Many thanks, Michael Foord -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html |
|
From: Whitaker, M. - B. <Whi...@BL...> - 2011-01-06 14:54:29
|
Can you take my name off the mailing list? Thanks. Maria Whitaker -----Original Message----- From: Michael Foord [mailto:fuz...@vo...] Sent: Thursday, January 06, 2011 7:23 AM To: con...@li... Subject: Re: [Configobj-develop] Improved list syntax On 05/01/2011 18:48, Stefan Parviainen wrote: > On Wed, Jan 5, 2011 at 8:28 PM, Michael Foord<fuz...@vo...> wrote: >>> I created a clone of ConfigObj on Google Code >>> (http://code.google.com/r/pafcu-configobj/) where I will put any >>> fixes and improvements to ConfigObj and Validator that I can come up with. >> Cool. When you're happy with what you've done could you create an >> issue on the configobj issue tracker and attach a patch please. > Personally I prefer the distributed workflow most projects seem to be > switching to: > "Because mercurial is a distributed (peer-to-peer) version control > system, it excels at branching and merging. If the project maintainers > like the new code, they just "pull" the changesets from the clone and > merge them into an official project repository. It's all much more > elegant than emailing patches back and forth, anonymous contributors > get to use the same tools as core developers." (From the Google Code > Docs). But I guess patches to the issue tracker is OK too. > > I'm pretty happy with the lists now (it was a pretty minor thing to > fix) and I also fixed issues #20, #24, #25, and #27 (added tests for > these + fixed some of the old tests). I'll see when I have time to put > together some patches. In the meantime anyone who wants to test this > can just pull the changes from my repository. > Ok, I can pull the changes from your repo instead of needing patches. Can you add a note to the relevant issues with the project / repo url. That will help when I come to look through the issues. Many thanks, Michael Foord -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html ---------------------------------------------------------------------------- -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Configobj-develop mailing list Con...@li... https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: David H. <neg...@gm...> - 2011-01-06 14:56:44
|
On Thu, Jan 6, 2011 at 09:22, Whitaker, Maria - BLS <Whi...@bl...> wrote: > Can you take my name off the mailing list? Thanks. No, but you can: https://lists.sourceforge.net/lists/listinfo/configobj-develop (the info is in the footer of every email sent to the list) cheers, -David |