[issue11027] Implement sectionxform in configparser

2016-07-08 Thread Berker Peksag

Berker Peksag added the comment:

Issue 26537 is a duplicate of this one but it has an up-to-date and more 
complete patch so I'm going to close this one.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> ConfigParser has optionxform, but not sectionxform

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2012-07-07 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-07-13 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Kunjesh, first of all many thanks for your feedback! A bit of advice, though. I 
have myself made the mistake of calling features I personally want as often 
needed. The reality is that they are not often needed if they weren't reported 
before. While the current behaviour is not intuitive and probably unwelcome, 
it's hardly a bug if it has been that way for 15 years now.

At one point I had `sectionxform` implemented for configparser 3.2 but it made 
the source less readable. Then I thought about what Raymond taught me: is this 
a feature that follows a real use case? I concluded it didn't so I left it out. 
That being said, your report proves that such functionality would be welcome. I 
checked and ConfigObj does strip whitespace from section names, too. 
Nevertheless, in my opinion that's a feature request that only applies to 
Python 3.3. Your patches are for 2.7.

Let me elaborate a bit on a broader issue: configparser as of 3.2 still has 
only limited ability to write configuration files back (it strips whitespace 
and comments between options, option names get xformed). I want to fix that for 
3.3 so the file can be altered and written back with only minimal changes. 
`optionxform` already gets in the way, `sectionxform` would too, if improperly 
implemented.

Raymond, I would want to keep the regexes as raw as possible as to enable 
writing the file back with the whitespace preserved. That includes whitespace 
around the section name, if we are to support that.

To conclude: I won't touch the regexes, I will implement `sectionxform` while 
implementing on-save whitespace and comment preservation for 3.3.

--
keywords:  -patch
stage:  - needs patch
title: Allow spaces around section header in ConfigParser - Implement 
sectionxform in configparser

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

My recommendation wasn't to change the regexes.

Instead, I recommended documenting how to override them in a subclass.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Sure, that I can do right away.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Kunjesh Kaushik

Kunjesh Kaushik kunjesh.kaus...@gmail.com added the comment:

Very well, then. I would rely on sub-classing for now. The patch would work for 
me as I am only reading configuration. :)

And yes, I wouldn't deny the personal bias anyway. Thanks a lot for all your 
help, folks. Keep up the good work!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
Removed message: http://bugs.python.org/msg127279

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Implement sectionxform in configparser

2011-01-28 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Documentation updated in r88220.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com