[Patches] [ python-Patches-545096 ] Janitoring in ConfigParser

noreply@sourceforge.net noreply@sourceforge.net
Mon, 22 Apr 2002 10:55:10 -0700


Patches item #545096, was opened at 2002-04-17 06:24
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=545096&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gustavo Niemeyer (niemeyer)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Janitoring in ConfigParser

Initial Comment:
The first patch fixes a bug, implements some speed 
improvements, some memory consumption improvements, 
enforces the usage of the already available global 
variables, and extends the allowed chars in option 
names to be very permissive. 
 
The second one, if used, is supposed to be applied 
over the first one, and implements a walk() 
generator method for walking trough the options of a 
section. 

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-22 13:55

Message:
Logged In: YES 
user_id=6380

I'm assigning this to Fred Drake, who has some opinions on
ConfigParser.

----------------------------------------------------------------------

Comment By: Gustavo Niemeyer (niemeyer)
Date: 2002-04-18 13:07

Message:
Logged In: YES 
user_id=7887

I'd rather explain here the patch that changes behavior, 
since it's pretty small. This line in the regular 
expression OPTCRE: 
 
r'(?P<option>[]\-[\w_.*,(){}]+)' 
 
was replaced by: 
 
r'(?P<option>[^:=\s]+)' 
 
So that instead of giving a range of characters which may 
be part of the option name, it just looks for the 
separator chars and spaces. This behavior is already used 
in the headers, and I haven't found any good reason to 
deny usage of other characters as option names. 
 
In the same regular expression, I've also replaced 
'[ \t]' by '\s', but this shouln't change the current 
behavior at all. 
 
About the walk patch, I have no idea why it isn't 
attached. I remember to have checked the ticked, and it 
was there. Anyway, I'm attaching it again. 

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-04-18 02:04

Message:
Logged In: YES 
user_id=21627

I'd like to see this split into even more parts: a patch
that supposedly has *no* semantic change (ie. the speed
improvements, memory consumption improvements, use of global
variables); a patch that changes behavior (please explain in
which ways); and the patch that implements walk (which
appears to be missing currently).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=545096&group_id=5470