[Python-Dev] ConfigParser behavior change

Fred L. Drake, Jr. fdrake at acm.org
Mon Aug 2 16:33:03 CEST 2004


On Monday 02 August 2004 10:13 am, David Goodger wrote:
 > Could I get some feedback re <http://www.python.org/sf/997050>?
 > I'd like to resolve this before 2.4a2 if possible.

David has (properly) been asking me to look into this, and i've managed not to 
have enough time.  Sorry, David!

 > RawConfigParser.set() doesn't allow non-string arguments for 'value'
 > any more.  This breaks Docutils code.  I specifically chose
 > RawConfigParser for Docutils internal settings support because it
 > *did* allow non-string values.
 >
 > An earlier bug report (<http://www.python.org/sf/810843>, "Support for
 > non-string data in ConfigParser unclear/buggy") offered 4 options:

The ConfigParser documentation was certainly too vague, but the problem, as I 
see it, is that the module was never intended to store non-string values.  I 
think allowing them is just asking for still more trouble from that module 
down the road.  Sure, the module could be made happy by reverting the patch 
you cite, but happy-by-accident is a very fragile state to be in.

 > The comment for bug 810843 says "This is documented behavior", but I
 > couldn't find any such documentation pre-dating this change.

This may have been a bug in my memory.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>



More information about the Python-Dev mailing list