Re: [PATCH] setting raw in get_items

2018-04-10 Thread Vijay Kumar Banerjee
On 11 April 2018 at 10:45, Chris Johns  wrote:

> On 11/04/2018 15:04, Vijay Kumar Banerjee wrote:
> > I was using Python 3, I just checked that it works fine with Python2.7
> without
> > the changes mentioned in the patch.
>
> I suggest you stay with python 2.7 and do not use python 3.
>
> Python 3 support is a separate issue and task and while it is important and
> there has been effort to support it the tools do break. As you can see we
> are
> close with only a couple of things we need to address. I would prefer to
> do a
> complete Python 3 sweep and clean up another time.
>
> Understood , I will use python 2.7  .

> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] setting raw in get_items

2018-04-10 Thread Chris Johns
On 11/04/2018 15:04, Vijay Kumar Banerjee wrote:
> I was using Python 3, I just checked that it works fine with Python2.7 without
> the changes mentioned in the patch.

I suggest you stay with python 2.7 and do not use python 3.

Python 3 support is a separate issue and task and while it is important and
there has been effort to support it the tools do break. As you can see we are
close with only a couple of things we need to address. I would prefer to do a
complete Python 3 sweep and clean up another time.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] setting raw in get_items

2018-04-10 Thread Vijay Kumar Banerjee
I was using Python 3, I just checked that it works fine with Python2.7
without the changes mentioned in the patch.

On 11 April 2018 at 06:20, Chris Johns  wrote:

> On 11/04/2018 07:04, vijaykumar9...@gmail.com wrote:
> > From: thelunatic 
> >
> > ---
> >  rtemstoolkit/configuration.py | 4 ++--
> >
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/rtemstoolkit/configuration.py b/rtemstoolkit/configuration.
> py
> > index 10d97e5..53ad79b 100644
> > --- a/rtemstoolkit/configuration.py
> > +++ b/rtemstoolkit/configuration.py
> > @@ -98,7 +98,7 @@ class configuration:
> >  def get_items(self, section, err = True, flatten = True):
> >  try:
> >  items = []
> > -for name, key in self.config.items(section):
> > +for name, key in self.config.items(section,raw=True):
>
> As stated in another email, this breaks Python 2.7 users where
> interpolation is
> being used. It is a requirement for this module to support interpolation
> and to
> support it to the level Python 3 has. This is why this module has
> functionality
> specific to Python 2.7.
>
> I suspect there is a problem else where in the code. I have not looked to
> see
> what the problem is you are having.
>
> >  if flatten:
> >  items += [(name, key.replace(os.linesep, ' '))]
> >  else:
> > @@ -117,7 +117,7 @@ class configuration:
> >
> >  def get_item_names(self, section, err = True):
> >  try:
> > -return [item[0] for item in self.config.items(section)]
> > +return [item[0] for item in self.config.items(section,raw=
> True)]
>
> Sorry, this change is not going to be accepted in the rtems-tools repo.
>
> FYI all the Python code we have has spaces after the ',' and between '='.
> You
> will find it easier to get patches accept by following the coding standard
> that
> is already present.
>
> I will keep this in mind .


> Thanks
> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] setting raw in get_items

2018-04-10 Thread Chris Johns
On 11/04/2018 07:04, vijaykumar9...@gmail.com wrote:
> From: thelunatic 
> 
> ---
>  rtemstoolkit/configuration.py | 4 ++--
>  
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/rtemstoolkit/configuration.py b/rtemstoolkit/configuration.py
> index 10d97e5..53ad79b 100644
> --- a/rtemstoolkit/configuration.py
> +++ b/rtemstoolkit/configuration.py
> @@ -98,7 +98,7 @@ class configuration:
>  def get_items(self, section, err = True, flatten = True):
>  try:
>  items = []
> -for name, key in self.config.items(section):
> +for name, key in self.config.items(section,raw=True):

As stated in another email, this breaks Python 2.7 users where interpolation is
being used. It is a requirement for this module to support interpolation and to
support it to the level Python 3 has. This is why this module has functionality
specific to Python 2.7.

I suspect there is a problem else where in the code. I have not looked to see
what the problem is you are having.

>  if flatten:
>  items += [(name, key.replace(os.linesep, ' '))]
>  else:
> @@ -117,7 +117,7 @@ class configuration:
>  
>  def get_item_names(self, section, err = True):
>  try:
> -return [item[0] for item in self.config.items(section)]
> +return [item[0] for item in self.config.items(section,raw=True)]

Sorry, this change is not going to be accepted in the rtems-tools repo.

FYI all the Python code we have has spaces after the ',' and between '='. You
will find it easier to get patches accept by following the coding standard that
is already present.

Thanks
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel