|
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: 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: 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: 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: 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: 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: 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 |