You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(18) |
Dec
(26) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(14) |
Feb
(28) |
Mar
(21) |
Apr
(17) |
May
(23) |
Jun
(12) |
Jul
(12) |
Aug
(7) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(10) |
| 2007 |
Jan
(5) |
Feb
(8) |
Mar
|
Apr
|
May
(7) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(20) |
Oct
(3) |
Nov
(2) |
Dec
(12) |
| 2008 |
Jan
(40) |
Feb
(15) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(19) |
Jul
(2) |
Aug
(17) |
Sep
(13) |
Oct
(7) |
Nov
(16) |
Dec
(5) |
| 2009 |
Jan
(15) |
Feb
(11) |
Mar
(11) |
Apr
(8) |
May
(6) |
Jun
(15) |
Jul
(19) |
Aug
(2) |
Sep
|
Oct
(19) |
Nov
(1) |
Dec
(3) |
| 2010 |
Jan
(12) |
Feb
(25) |
Mar
(45) |
Apr
(4) |
May
(2) |
Jun
(4) |
Jul
(6) |
Aug
(13) |
Sep
(1) |
Oct
(2) |
Nov
(2) |
Dec
(9) |
| 2011 |
Jan
(24) |
Feb
(7) |
Mar
(1) |
Apr
(6) |
May
(3) |
Jun
(3) |
Jul
|
Aug
(13) |
Sep
(9) |
Oct
(7) |
Nov
(17) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(5) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(17) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(3) |
Oct
(3) |
Nov
|
Dec
|
| 2015 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(10) |
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Darren S. <pha...@gm...> - 2015-01-07 06:29:26
|
Greetings, Have been enjoying the validator functionality in ConfigObj greatly (configspecs). I have a case where my configuration has a section which may contain many subsections, and I'd like the ability to apply a validator to the name of the subsections (they should only be integers in the range of 100 to 10000000). Is this currently possible in ConfigObj? Otherwise, something that could be made possible? Thinking something along the lines of a key name in the configspec of __name__, e.g.: [foo] [[__many__]] __name__ = integer(100,10000000) field1 = string field2 = integer(0,100) -- Darren Spruell pha...@gm... |
|
From: pisymbol . <pis...@gm...> - 2014-10-07 14:15:35
|
On Mon, Oct 6, 2014 at 11:00 PM, Rob Dennis <rd...@gm...> wrote: > Hello aps, > > I'm one of the current maintainers, though this is an area where I have no > special experience/knowledge. > > I did take a look at the in-code documentation, and it appears that the > code for looking for "default=<value>" is handled before it's ever passed > to the check function (the custom_bar you wrote). The function in question: > https://github.com/DiffSK/configobj/blob/master/validate.py#L616 > > have you tried adding a "default=<some_value>" to the configspec, without > changing your function? > > <http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk> > LOL, yeah that works. Not sure how I missed that. -aps |
|
From: Rob D. <rd...@gm...> - 2014-10-07 03:00:50
|
Hello aps, I'm one of the current maintainers, though this is an area where I have no special experience/knowledge. I did take a look at the in-code documentation, and it appears that the code for looking for "default=<value>" is handled before it's ever passed to the check function (the custom_bar you wrote). The function in question: https://github.com/DiffSK/configobj/blob/master/validate.py#L616 have you tried adding a "default=<some_value>" to the configspec, without changing your function? On Mon, Oct 6, 2014 at 6:12 PM, pisymbol . <pis...@gm...> wrote: > Hello: > > I am trying to do the following: > > foo.spec: > > [Foo] > bar = custom_bar() > > If bar exists under Foo section, call custom_bar(). That works. > > However, if the INI file passed to ConfigObj.validate() does not contain > bar at all, the section just fails validation since looking at the source, > it seems validation is what sets the default value. > > Is there a way to write a custom check function and also have a default > value filled in similar to the built-in ones like integer's, string's, > default argument, etc.? > > I've looked high and low for an example and I can't seem to find one. > > Thanks! > > -aps > > > ------------------------------------------------------------------------------ > Slashdot TV. Videos for Nerds. Stuff that Matters. > > http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: pisymbol . <pis...@gm...> - 2014-10-06 22:12:51
|
Hello: I am trying to do the following: foo.spec: [Foo] bar = custom_bar() If bar exists under Foo section, call custom_bar(). That works. However, if the INI file passed to ConfigObj.validate() does not contain bar at all, the section just fails validation since looking at the source, it seems validation is what sets the default value. Is there a way to write a custom check function and also have a default value filled in similar to the built-in ones like integer's, string's, default argument, etc.? I've looked high and low for an example and I can't seem to find one. Thanks! -aps |
|
From: Michael F. <fuz...@vo...> - 2014-09-03 15:03:08
|
On 03/09/14 15:35, Rob Dennis wrote: > Hello there :-). Michael would have to answer this, but I had assumed > this was based on python using # for comments. > > Looking into this a bit more, I see that the ConfigParser module does > allow both ; and #, and ini files only allows ;. > > At the time we wrote ConfigObj we didn't see a reason to provide a choice (fewer choices are better and supporting both would have added complexity to the parser) and we had very few requests to change that ever since. Michael > On Wed, Sep 3, 2014 at 3:39 AM, 望洋兴叹 <784...@qq... > <mailto:784...@qq...>> wrote: > > firstly,thanks configobj-develop team.thank you give us so > useful open source package. > but when i use this package, using the '#' as the begin of > comment is a big problem. > we usually use ‘;’ to mark the comment. it spend me too much > time to change the source code . > so i want to know why don't use ';' ,if there were some > special resons. > looking forward your response. > > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: Rob D. <rd...@gm...> - 2014-09-03 14:36:11
|
Hello there :-). Michael would have to answer this, but I had assumed this was based on python using # for comments. Looking into this a bit more, I see that the ConfigParser module does allow both ; and #, and ini files only allows ;. On Wed, Sep 3, 2014 at 3:39 AM, 望洋兴叹 <784...@qq...> wrote: > firstly,thanks configobj-develop team.thank you give us so useful open source package. > but when i use this package, using the '#' as the begin of comment is a big problem. > we usually use ‘;’ to mark the comment. it spend me too much time to change the source code . > so i want to know why don't use ';' ,if there were some special resons. > looking forward your response. |
|
From: 望. <784...@qq...> - 2014-09-03 07:39:19
|
firstly,thanks configobj-develop team.thank you give us so useful open source package.
but when i use this package, using the '#' as the begin of comment is a big problem.
we usually use ‘;’ to mark the comment. it spend me too much time to change the source code .
so i want to know why don't use ';' ,if there were some special resons.
looking forward your response. |
|
From: Michael F. <fuz...@vo...> - 2014-08-30 07:57:27
|
On 29 Aug 2014, at 23:57, Sumit's Mailing Lists <li...@ba...> wrote: > I must have midread my logs earlier. The following does return a one > element list, even if I have trailing whitespace: > > value = foo, > > So that works fine. Thanks. :) The only other question I had was I > didn't see anything in the docs for optional arguments. I realize I can > use the following to set a default: > > name = string(default='') > > And I can just check for the empty string, but this doesn't really work > with other types: > > minRange = integer(default=?) I'm pretty sure that most of the spec types will take None as a default - so you can tell if the value was missing. All the best, Michael > > I can't really use -1 because that's a valid range and there are some > sections where this is totally optional and needs to be treated > differently if it's not set. > > Is there a way to make some arguments optional, but still assign them a > type if they're present? > > Sumit > > > On 30/08/14 00:59, Michael Foord wrote: >> On 29 Aug 2014, at 09:46, Sumit's Mailing Lists <li...@ba...> wrote: >> >>> Hey there, >>> >>> I'm using ConfigObj for a project and am trying to get it to accept >>> single element lists. I've run into a some issues which I documented on >>> this Stackoverflow Questions: >>> >>> http://stackoverflow.com/questions/25561597/configobj-and-single-element-lists >>> >>> Is what I'm trying to do possibly with the current version of ConfigObj? >> The correct syntax for a single element list is: >> >> value = foo, >> >> A trailing comma, no brackets or braces. The value you get back with two elements including an empty string is probably a bug though. >> >> All the best, >> >> Michael Foord >> >>> Sumit >>> >>> >>> ------------------------------------------------------------------------------ >>> Slashdot TV. >>> Video for Nerds. Stuff that matters. >>> http://tv.slashdot.org/ >>> _______________________________________________ >>> Configobj-develop mailing list >>> Con...@li... >>> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> >> -- >> 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 >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop -- 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: Sumit's M. L. <li...@ba...> - 2014-08-29 20:57:48
|
I must have midread my logs earlier. The following does return a one element list, even if I have trailing whitespace: value = foo, So that works fine. Thanks. :) The only other question I had was I didn't see anything in the docs for optional arguments. I realize I can use the following to set a default: name = string(default='') And I can just check for the empty string, but this doesn't really work with other types: minRange = integer(default=?) I can't really use -1 because that's a valid range and there are some sections where this is totally optional and needs to be treated differently if it's not set. Is there a way to make some arguments optional, but still assign them a type if they're present? Sumit On 30/08/14 00:59, Michael Foord wrote: > On 29 Aug 2014, at 09:46, Sumit's Mailing Lists <li...@ba...> wrote: > >> Hey there, >> >> I'm using ConfigObj for a project and am trying to get it to accept >> single element lists. I've run into a some issues which I documented on >> this Stackoverflow Questions: >> >> http://stackoverflow.com/questions/25561597/configobj-and-single-element-lists >> >> Is what I'm trying to do possibly with the current version of ConfigObj? > The correct syntax for a single element list is: > > value = foo, > > A trailing comma, no brackets or braces. The value you get back with two elements including an empty string is probably a bug though. > > All the best, > > Michael Foord > >> Sumit >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop > > -- > 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 > > > > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Rob D. <rd...@gm...> - 2014-08-29 13:37:09
|
Thanks Michael for confirming my read, and to Sumit for asking the question. I answered your question on SO a few moments ago. On Fri, Aug 29, 2014 at 9:24 AM, Michael Foord <fuz...@vo...> wrote: > On 29 Aug 2014, at 09:46, Sumit's Mailing Lists <li...@ba...> wrote: >> Hey there, >> >> I'm using ConfigObj for a project and am trying to get it to accept >> single element lists. I've run into a some issues which I documented on >> this Stackoverflow Questions: >> >> http://stackoverflow.com/questions/25561597/configobj-and-single-element-lists >> >> Is what I'm trying to do possibly with the current version of ConfigObj? > The correct syntax for a single element list is: > value = foo, > A trailing comma, no brackets or braces. The value you get back with two elements including an empty string is probably a bug though. > All the best, > Michael Foord >> >> Sumit >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop > -- > 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 > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: Michael F. <fuz...@vo...> - 2014-08-29 13:24:17
|
On 29 Aug 2014, at 09:46, Sumit's Mailing Lists <li...@ba...> wrote: > Hey there, > > I'm using ConfigObj for a project and am trying to get it to accept > single element lists. I've run into a some issues which I documented on > this Stackoverflow Questions: > > http://stackoverflow.com/questions/25561597/configobj-and-single-element-lists > > Is what I'm trying to do possibly with the current version of ConfigObj? The correct syntax for a single element list is: value = foo, A trailing comma, no brackets or braces. The value you get back with two elements including an empty string is probably a bug though. All the best, Michael Foord > > Sumit > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop -- 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: Sumit's M. L. <li...@ba...> - 2014-08-29 06:46:35
|
Hey there, I'm using ConfigObj for a project and am trying to get it to accept single element lists. I've run into a some issues which I documented on this Stackoverflow Questions: http://stackoverflow.com/questions/25561597/configobj-and-single-element-lists Is what I'm trying to do possibly with the current version of ConfigObj? Sumit |
|
From: Ludovic G. <gm...@gm...> - 2014-04-30 12:56:11
|
I don't know if you could help you, but with configparser, you have a special section, named DEFAULT: https://docs.python.org/2/library/configparser.html Maybe the original developer wanted to implement the same behaviour but it isn't finished ? -- Ludovic Gasc On Wed, Apr 30, 2014 at 1:54 AM, Rob Dennis <rd...@gm...> wrote: > I commented on what I believe is the associated github issue: > https://github.com/DiffSK/configobj/issues/58 > > > On Tue, Apr 29, 2014 at 11:10 AM, Mario Aranha <ma...@se...>wrote: > >> I think I originally chose DEFAULT to use global interpolation. >> But it appears to have caused other problems like skipping validation, >> etc. >> There's a "FIXME" comment ~line 2300. >> >> I'll change to 'default'. Thanks!!! >> >> -Mario >> >> On 04/29/14 09:55, Jim Crowell wrote: >> > Actually that appears to be the only bug, replacing "DEFAULT" with >> > "default" (and replacing print with pprint) yields: >> > >> > {'CHANNELS': True, >> > 'default': {'FOOBAR': True, >> > 'JUNK': VdtTypeError('the value "foobar" is of the wrong >> > type.',)}} >> > >> > (this is with github configobj in Python 2.7). >> > >> > -Jim >> > >> > >> > On Tue, Apr 29, 2014, at 10:42 AM, Jim Crowell wrote: >> >> Started crawling through it with the debugger, found one "feature" >> >> already: the word DEFAULT appears to have some special, undocumented >> >> significance (configobj.py from github, line 2301). Got to leave it for >> >> a while now. >> >> >> >> -Jim >> >> >> >> On Mon, Apr 28, 2014, at 04:46 PM, Jim Crowell wrote: >> >>> It appears not to like capital letters as the field names, when I >> change >> >>> e.g. DEFAULT to default and so on, it works. >> >>> >> >>> -Jim C. >> >>> >> >>>> Date: Mon, 28 Apr 2014 13:22:39 -0700 >> >>>> From: Mario Aranha <ma...@se...> >> >>>> Subject: Re: [Configobj-develop] validate() always returns True >> >>>> To: con...@li... >> >>>> Message-ID: <535...@se...> >> >>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >>>> >> >>>> If I change the config file: >> >>>> JUNK = "foobar" >> >>>> validate still returns True even though the spec file says JUNK is an >> >>>> integer. >> >>>> I also tried with unrepr=True parameter to configObj(). >> > >> ------------------------------------------------------------------------------ >> > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> > Instantly run your Selenium tests across 300+ browser/OS combos. Get >> > unparalleled scalability from the best Selenium testing platform >> available. >> > Simple to use. Nothing to install. Get started now for free." >> > http://p.sf.net/sfu/SauceLabs >> > _______________________________________________ >> > Configobj-develop mailing list >> > Con...@li... >> > https://lists.sourceforge.net/lists/listinfo/configobj-develop >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform >> available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Werner B. <wer...@gm...> - 2014-04-30 08:17:45
|
Hi Rob, Sorry for confusion, should have provided more detail. I am using WingIDE which has a builtin source assistant which shows the doc of whatever one points to in the source editor. So the link I was mentioning is coming from the 5.0.5 version of the class Validator(object) which I installed with pip. Werner On 4/30/2014 2:42, Rob Dennis wrote: > Interesting, I see what you're referencing. Just to be clear, when I > reference the docs, I'm talking about: > http://configobj.readthedocs.org/en/latest/index.html (specifically > the validate section). > > You are definitely right that the Validator docstring does reference a > voidspace url: > https://github.com/DiffSK/configobj/blob/master/validate.py#L541 > > That should be updated and I've made a ticket: > https://github.com/DiffSK/configobj/issues/59 > > > > On Mon, Apr 28, 2014 at 12:28 PM, Werner <wer...@gm... > <mailto:wer...@gm...>> wrote: > > Hi Rob, > > Just noted that the doc still has reference to voidspace. > > E.g. > > For more details on using Validator with ConfigObj > see:http://www.voidspace.org.uk/python/configobj.html > > Werner > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform > available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > <mailto:Con...@li...> > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop -- Niderenweg 6 CH-9043 Trogen Tel: +41 71 340 06 30 Mob: +41 76 374 81 07 |
|
From: Rob D. <rd...@gm...> - 2014-04-30 00:42:57
|
Interesting, I see what you're referencing. Just to be clear, when I reference the docs, I'm talking about: http://configobj.readthedocs.org/en/latest/index.html (specifically the validate section). You are definitely right that the Validator docstring does reference a voidspace url: https://github.com/DiffSK/configobj/blob/master/validate.py#L541 That should be updated and I've made a ticket: https://github.com/DiffSK/configobj/issues/59 On Mon, Apr 28, 2014 at 12:28 PM, Werner <wer...@gm...> wrote: > Hi Rob, > > Just noted that the doc still has reference to voidspace. > > E.g. > > For more details on using Validator with ConfigObj see: > http://www.voidspace.org.uk/python/configobj.html > > Werner > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |
|
From: Rob D. <rd...@gm...> - 2014-04-29 23:54:58
|
I commented on what I believe is the associated github issue: https://github.com/DiffSK/configobj/issues/58 On Tue, Apr 29, 2014 at 11:10 AM, Mario Aranha <ma...@se...>wrote: > I think I originally chose DEFAULT to use global interpolation. > But it appears to have caused other problems like skipping validation, etc. > There's a "FIXME" comment ~line 2300. > > I'll change to 'default'. Thanks!!! > > -Mario > > On 04/29/14 09:55, Jim Crowell wrote: > > Actually that appears to be the only bug, replacing "DEFAULT" with > > "default" (and replacing print with pprint) yields: > > > > {'CHANNELS': True, > > 'default': {'FOOBAR': True, > > 'JUNK': VdtTypeError('the value "foobar" is of the wrong > > type.',)}} > > > > (this is with github configobj in Python 2.7). > > > > -Jim > > > > > > On Tue, Apr 29, 2014, at 10:42 AM, Jim Crowell wrote: > >> Started crawling through it with the debugger, found one "feature" > >> already: the word DEFAULT appears to have some special, undocumented > >> significance (configobj.py from github, line 2301). Got to leave it for > >> a while now. > >> > >> -Jim > >> > >> On Mon, Apr 28, 2014, at 04:46 PM, Jim Crowell wrote: > >>> It appears not to like capital letters as the field names, when I > change > >>> e.g. DEFAULT to default and so on, it works. > >>> > >>> -Jim C. > >>> > >>>> Date: Mon, 28 Apr 2014 13:22:39 -0700 > >>>> From: Mario Aranha <ma...@se...> > >>>> Subject: Re: [Configobj-develop] validate() always returns True > >>>> To: con...@li... > >>>> Message-ID: <535...@se...> > >>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >>>> > >>>> If I change the config file: > >>>> JUNK = "foobar" > >>>> validate still returns True even though the spec file says JUNK is an > >>>> integer. > >>>> I also tried with unrepr=True parameter to configObj(). > > > ------------------------------------------------------------------------------ > > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > > Instantly run your Selenium tests across 300+ browser/OS combos. Get > > unparalleled scalability from the best Selenium testing platform > available. > > Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > _______________________________________________ > > Configobj-develop mailing list > > Con...@li... > > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |
|
From: Mario A. <ma...@se...> - 2014-04-29 17:10:49
|
I think I originally chose DEFAULT to use global interpolation.
But it appears to have caused other problems like skipping validation, etc.
There's a "FIXME" comment ~line 2300.
I'll change to 'default'. Thanks!!!
-Mario
On 04/29/14 09:55, Jim Crowell wrote:
> Actually that appears to be the only bug, replacing "DEFAULT" with
> "default" (and replacing print with pprint) yields:
>
> {'CHANNELS': True,
> 'default': {'FOOBAR': True,
> 'JUNK': VdtTypeError('the value "foobar" is of the wrong
> type.',)}}
>
> (this is with github configobj in Python 2.7).
>
> -Jim
>
>
> On Tue, Apr 29, 2014, at 10:42 AM, Jim Crowell wrote:
>> Started crawling through it with the debugger, found one "feature"
>> already: the word DEFAULT appears to have some special, undocumented
>> significance (configobj.py from github, line 2301). Got to leave it for
>> a while now.
>>
>> -Jim
>>
>> On Mon, Apr 28, 2014, at 04:46 PM, Jim Crowell wrote:
>>> It appears not to like capital letters as the field names, when I change
>>> e.g. DEFAULT to default and so on, it works.
>>>
>>> -Jim C.
>>>
>>>> Date: Mon, 28 Apr 2014 13:22:39 -0700
>>>> From: Mario Aranha <ma...@se...>
>>>> Subject: Re: [Configobj-develop] validate() always returns True
>>>> To: con...@li...
>>>> Message-ID: <535...@se...>
>>>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>>>
>>>> If I change the config file:
>>>> JUNK = "foobar"
>>>> validate still returns True even though the spec file says JUNK is an
>>>> integer.
>>>> I also tried with unrepr=True parameter to configObj().
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos. Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
|
|
From: Jim C. <jac...@ma...> - 2014-04-29 16:55:22
|
Actually that appears to be the only bug, replacing "DEFAULT" with
"default" (and replacing print with pprint) yields:
{'CHANNELS': True,
'default': {'FOOBAR': True,
'JUNK': VdtTypeError('the value "foobar" is of the wrong
type.',)}}
(this is with github configobj in Python 2.7).
-Jim
On Tue, Apr 29, 2014, at 10:42 AM, Jim Crowell wrote:
> Started crawling through it with the debugger, found one "feature"
> already: the word DEFAULT appears to have some special, undocumented
> significance (configobj.py from github, line 2301). Got to leave it for
> a while now.
>
> -Jim
>
> On Mon, Apr 28, 2014, at 04:46 PM, Jim Crowell wrote:
> >
> > It appears not to like capital letters as the field names, when I change
> > e.g. DEFAULT to default and so on, it works.
> >
> > -Jim C.
> >
> > > Date: Mon, 28 Apr 2014 13:22:39 -0700
> > > From: Mario Aranha <ma...@se...>
> > > Subject: Re: [Configobj-develop] validate() always returns True
> > > To: con...@li...
> > > Message-ID: <535...@se...>
> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> > >
> > > If I change the config file:
> > > JUNK = "foobar"
> > > validate still returns True even though the spec file says JUNK is an
> > > integer.
> > > I also tried with unrepr=True parameter to configObj().
|
|
From: Jim C. <jac...@ma...> - 2014-04-29 15:42:09
|
Started crawling through it with the debugger, found one "feature" already: the word DEFAULT appears to have some special, undocumented significance (configobj.py from github, line 2301). Got to leave it for a while now. -Jim On Mon, Apr 28, 2014, at 04:46 PM, Jim Crowell wrote: > > It appears not to like capital letters as the field names, when I change > e.g. DEFAULT to default and so on, it works. > > -Jim C. > > > Date: Mon, 28 Apr 2014 13:22:39 -0700 > > From: Mario Aranha <ma...@se...> > > Subject: Re: [Configobj-develop] validate() always returns True > > To: con...@li... > > Message-ID: <535...@se...> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > If I change the config file: > > JUNK = "foobar" > > validate still returns True even though the spec file says JUNK is an > > integer. > > I also tried with unrepr=True parameter to configObj(). |
|
From: Mario A. <ma...@se...> - 2014-04-28 22:04:13
|
Hmm, yes you are correct it pointed out that JUNK was of the wrong type when I changed DEFAULT to lower case. Looks like a bug. -Mario On 04/28/14 14:46, Jim Crowell wrote: > It appears not to like capital letters as the field names, when I change > e.g. DEFAULT to default and so on, it works. > > -Jim C. > >> Date: Mon, 28 Apr 2014 13:22:39 -0700 >> From: Mario Aranha <ma...@se...> >> Subject: Re: [Configobj-develop] validate() always returns True >> To: con...@li... >> Message-ID: <535...@se...> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> If I change the config file: >> JUNK = "foobar" >> validate still returns True even though the spec file says JUNK is an >> integer. >> I also tried with unrepr=True parameter to configObj(). >> >> I would think its better to use the latest version rather than 4.7.2? >> Also, I'm using Python 2.6 for various other compatibility reasons. >> >> This is such a simple example so what am I doing wrong? >> >> -Mario > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: Jim C. <jac...@ma...> - 2014-04-28 21:46:59
|
It appears not to like capital letters as the field names, when I change e.g. DEFAULT to default and so on, it works. -Jim C. > Date: Mon, 28 Apr 2014 13:22:39 -0700 > From: Mario Aranha <ma...@se...> > Subject: Re: [Configobj-develop] validate() always returns True > To: con...@li... > Message-ID: <535...@se...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > If I change the config file: > JUNK = "foobar" > validate still returns True even though the spec file says JUNK is an > integer. > I also tried with unrepr=True parameter to configObj(). > > I would think its better to use the latest version rather than 4.7.2? > Also, I'm using Python 2.6 for various other compatibility reasons. > > This is such a simple example so what am I doing wrong? > > -Mario |
|
From: Mario A. <ma...@se...> - 2014-04-28 20:22:47
|
If I change the config file: JUNK = "foobar" validate still returns True even though the spec file says JUNK is an integer. I also tried with unrepr=True parameter to configObj(). I would think its better to use the latest version rather than 4.7.2? Also, I'm using Python 2.6 for various other compatibility reasons. This is such a simple example so what am I doing wrong? -Mario On 04/28/14 12:51, Jim Crowell wrote: > As best I can remember, strings in configobj files don't require > quoting, so your foo.cfg is in fact valid. > (i.e. FOOBAR = 1 gives you a valid string, "1"). > > I can't address your crash, I'm using configobj 4.7.2 and it doesn't > happen in my setup. > > -Jim C. > >> Date: Sun, 27 Apr 2014 21:22:12 -0700 >> From: Mario Aranha <ma...@se...> >> Subject: [Configobj-develop] configobj 5.0.4 on Linux >> To: con...@li... >> Message-ID: <535...@se...> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> I'm trying to use 'configobj' but not having much success: >> (1) It appears that validate() ALWAYS returns True, even if my config >> file does not conform to spec. >> (2) If I repeat one of the sub-sections in the "many" section I get: >> Traceback (most recent call last): >> File "./config.py", line 7, in <module> >> config = ConfigObj(infile="foo.cfg", configspec="foo.spec") >> File "/home/glarms/python/site-packages/configobj.py", line 1229, in >> __init__ >> self._load(infile, configspec) >> File "/home/glarms/python/site-packages/configobj.py", line 1318, in >> _load >> raise error >> configobj.ConfigObjError: Parsing failed with several errors. >> First error at line 14. >> >> Attached is my (simple) example program, config and spec files. >> Any help would be much appreciated. >> >> :::::::::::::: >> config.py >> :::::::::::::: >> #!/usr/bin/python >> >> import os, sys >> from configobj import ConfigObj, ConfigObjError, flatten_errors >> from validate import Validator, ValidateError >> >> config = ConfigObj(infile="foo.cfg", configspec="foo.spec") >> vtor = Validator() >> results = config.validate(vtor, preserve_errors=True) >> print "results=", results >> :::::::::::::: >> foo.cfg >> :::::::::::::: >> # >> # example config file >> # >> >> # global options >> [DEFAULT] >> FOOBAR = 1 >> JUNK = 0 >> >> # baseline options >> [CHANNELS] >> [[SRB1-BRIB]] >> instance = 0 >> [[OHLN-BRIB]] >> instance = 0 >> >> :::::::::::::: >> foo.spec >> :::::::::::::: >> # >> # config spec file for G-larnS >> # >> [DEFAULT] >> FOOBAR = string >> JUNK = integer >> >> [CHANNELS] >> [[__many__]] >> instance = integer(default=0) >> off = boolean(default=False) >> >> >> ------------------------------ >> >> Message: 6 >> Date: Mon, 28 Apr 2014 17:03:04 +0200 >> From: Werner <wer...@gm...> >> Subject: [Configobj-develop] pip install on Py 3.4 >> To: con...@li... >> Message-ID: <535...@gm...> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi, >> >> I am just trying out configobj and validate and I get this error when >> trying to install validate on Py 3.4 I get the following error. >> >> configobj installed fine, is validate not yet Py3 compatible? >> >> Werner >> >> C:\Python34\Scripts\pip3.4 run on 04/28/14 16:50:00 >> Downloading/unpacking validate >> Getting page https://pypi.python.org/simple/validate/ >> URLs to search for versions for validate: >> * https://pypi.python.org/simple/validate/ >> Analyzing links from page https://pypi.python.org/simple/validate/ >> Found link >> https://pypi.python.org/packages/source/v/validate/validate-1.0.0.tar.gz#md5=bc6418183b86dd68e8179b9c0d0ebc33 >> (from https://pypi.python.org/simple/validate/), version: 1.0.0 >> Found link >> https://pypi.python.org/packages/source/v/validate/validate-1.0.1.tar.gz#md5=344d67d133de0e1d824f0f6d74dba97a >> (from https://pypi.python.org/simple/validate/), version: 1.0.1 >> Skipping link http://www.voidspace.org.uk/python/configobj.html >> (from https://pypi.python.org/simple/validate/); unknown archive format: >> .html >> Skipping link http://www.voidspace.org.uk/python/validate.html >> (from https://pypi.python.org/simple/validate/); unknown archive format: >> .html >> Using version 1.0.1 (newest of versions: 1.0.1, 1.0.0) >> Downloading validate-1.0.1.tar.gz >> Downloading from URL >> https://pypi.python.org/packages/source/v/validate/validate-1.0.1.tar.gz#md5=344d67d133de0e1d824f0f6d74dba97a >> (from https://pypi.python.org/simple/validate/) >> Running setup.py >> (path:C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py) >> egg_info for package validate >> Traceback (most recent call last): >> File "<string>", line 17, in <module> >> File >> "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py", >> line 13, in <module> >> from configobj import __version__ as VERSION >> File >> "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\configobj.py", >> line 1632 >> except Exception, e: >> ^ >> SyntaxError: invalid syntax >> Complete output from command python setup.py egg_info: >> Traceback (most recent call last): >> >> File "<string>", line 17, in <module> >> >> File >> "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py", >> line 13, in <module> >> >> from configobj import __version__ as VERSION >> >> File >> "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\configobj.py", >> line 1632 >> >> except Exception, e: >> >> ^ >> >> SyntaxError: invalid syntax >> >> >> >> >> >> ------------------------------ >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform >> available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> >> ------------------------------ >> >> _______________________________________________ >> Configobj-develop mailing list >> Con...@li... >> https://lists.sourceforge.net/lists/listinfo/configobj-develop >> >> >> End of Configobj-develop Digest, Vol 64, Issue 1 >> ************************************************ > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop |
|
From: Jim C. <jac...@ma...> - 2014-04-28 20:12:34
|
Hi Michael,
It's worked out great so far. Perfectly for json, and for yaml provided
you decide beforehand whether or not you're going to allow node
references in your yaml file ('not' is much easier).
-Jim C.
> Date: Mon, 27 Jan 2014 13:55:11 +0000
> From: Michael Foord <fuz...@vo...>
> Subject: Re: [Configobj-develop] Does this qualify as an epiphany?
> To: con...@li...
> Message-ID: <8BD...@vo...>
> Content-Type: text/plain; charset=us-ascii
>
>
> On 24 Jan 2014, at 20:00, Jim Crowell <jac...@ma...> wrote:
>
> > ...since configobj/validate can be used to schema-validate input in
> > already-converted dicts, they can be used to validate json or yaml as
> > well as ini files (not sure that it would work for all possible yaml
> > files)...
> >
>
>
> Well, the goal with validate was to create a reusable library that could
> be used for validation against arbitrary text sources. So if you find it
> useful *great*. I've not directly tried it for yaml or json, but I can
> imagine it being useful there.
>
> Michael
|
|
From: Jim C. <jac...@ma...> - 2014-04-28 20:07:33
|
As best I can remember, strings in configobj files don't require quoting, so your foo.cfg is in fact valid. (i.e. FOOBAR = 1 gives you a valid string, "1"). I can't address your crash, I'm using configobj 4.7.2 and it doesn't happen in my setup. -Jim C. > Date: Sun, 27 Apr 2014 21:22:12 -0700 > From: Mario Aranha <ma...@se...> > Subject: [Configobj-develop] configobj 5.0.4 on Linux > To: con...@li... > Message-ID: <535...@se...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I'm trying to use 'configobj' but not having much success: > (1) It appears that validate() ALWAYS returns True, even if my config > file does not conform to spec. > (2) If I repeat one of the sub-sections in the "many" section I get: > Traceback (most recent call last): > File "./config.py", line 7, in <module> > config = ConfigObj(infile="foo.cfg", configspec="foo.spec") > File "/home/glarms/python/site-packages/configobj.py", line 1229, in > __init__ > self._load(infile, configspec) > File "/home/glarms/python/site-packages/configobj.py", line 1318, in > _load > raise error > configobj.ConfigObjError: Parsing failed with several errors. > First error at line 14. > > Attached is my (simple) example program, config and spec files. > Any help would be much appreciated. > > :::::::::::::: > config.py > :::::::::::::: > #!/usr/bin/python > > import os, sys > from configobj import ConfigObj, ConfigObjError, flatten_errors > from validate import Validator, ValidateError > > config = ConfigObj(infile="foo.cfg", configspec="foo.spec") > vtor = Validator() > results = config.validate(vtor, preserve_errors=True) > print "results=", results > :::::::::::::: > foo.cfg > :::::::::::::: > # > # example config file > # > > # global options > [DEFAULT] > FOOBAR = 1 > JUNK = 0 > > # baseline options > [CHANNELS] > [[SRB1-BRIB]] > instance = 0 > [[OHLN-BRIB]] > instance = 0 > > :::::::::::::: > foo.spec > :::::::::::::: > # > # config spec file for G-larnS > # > [DEFAULT] > FOOBAR = string > JUNK = integer > > [CHANNELS] > [[__many__]] > instance = integer(default=0) > off = boolean(default=False) > > -- > Mario Aranha University of California, Berkeley > ma...@se... Berkeley Seismological Laboratory > Office: 510-643-3898 215 McCone Hall # 4760 > Fax: 510-643-5811 Berkeley, CA 94720-4760 > > > > > ------------------------------ > > Message: 6 > Date: Mon, 28 Apr 2014 17:03:04 +0200 > From: Werner <wer...@gm...> > Subject: [Configobj-develop] pip install on Py 3.4 > To: con...@li... > Message-ID: <535...@gm...> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, > > I am just trying out configobj and validate and I get this error when > trying to install validate on Py 3.4 I get the following error. > > configobj installed fine, is validate not yet Py3 compatible? > > Werner > > C:\Python34\Scripts\pip3.4 run on 04/28/14 16:50:00 > Downloading/unpacking validate > Getting page https://pypi.python.org/simple/validate/ > URLs to search for versions for validate: > * https://pypi.python.org/simple/validate/ > Analyzing links from page https://pypi.python.org/simple/validate/ > Found link > https://pypi.python.org/packages/source/v/validate/validate-1.0.0.tar.gz#md5=bc6418183b86dd68e8179b9c0d0ebc33 > (from https://pypi.python.org/simple/validate/), version: 1.0.0 > Found link > https://pypi.python.org/packages/source/v/validate/validate-1.0.1.tar.gz#md5=344d67d133de0e1d824f0f6d74dba97a > (from https://pypi.python.org/simple/validate/), version: 1.0.1 > Skipping link http://www.voidspace.org.uk/python/configobj.html > (from https://pypi.python.org/simple/validate/); unknown archive format: > .html > Skipping link http://www.voidspace.org.uk/python/validate.html > (from https://pypi.python.org/simple/validate/); unknown archive format: > .html > Using version 1.0.1 (newest of versions: 1.0.1, 1.0.0) > Downloading validate-1.0.1.tar.gz > Downloading from URL > https://pypi.python.org/packages/source/v/validate/validate-1.0.1.tar.gz#md5=344d67d133de0e1d824f0f6d74dba97a > (from https://pypi.python.org/simple/validate/) > Running setup.py > (path:C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py) > egg_info for package validate > Traceback (most recent call last): > File "<string>", line 17, in <module> > File > "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py", > line 13, in <module> > from configobj import __version__ as VERSION > File > "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\configobj.py", > line 1632 > except Exception, e: > ^ > SyntaxError: invalid syntax > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "<string>", line 17, in <module> > > File > "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\setup.py", > line 13, in <module> > > from configobj import __version__ as VERSION > > File > "C:\Users\wbruhin\AppData\Local\Temp\pip_build_wbruhin\validate\configobj.py", > line 1632 > > except Exception, e: > > ^ > > SyntaxError: invalid syntax > > > > > > ------------------------------ > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform > available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > ------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > > End of Configobj-develop Digest, Vol 64, Issue 1 > ************************************************ |
|
From: Werner <wer...@gm...> - 2014-04-28 18:28:44
|
Hi Rob, Just noted that the doc still has reference to voidspace. E.g. For more details on using Validator with ConfigObj see:http://www.voidspace.org.uk/python/configobj.html Werner |