[Python-Dev] ConfigParser behavior change (original) (raw)
David Goodger goodger at python.org
Mon Aug 2 16:13:36 CEST 2004
- Previous message: [Python-Dev] Fix import errors to have data
- Next message: [Python-Dev] ConfigParser behavior change
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could I get some feedback re <http://www.python.org/sf/997050>? I'd like to resolve this before 2.4a2 if possible.
In summary,
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:
(1) Cast the option to a string explicitly instead of assuming it is a string (2) Check that the option is a string (3) State in the documentation that the set() method only takes string values (4) State in the documentation that the raw parameter should be used when an option's value might not be of type string
Options 2 & 3 were implemented in the "bug fix" (just a type check). I think that the behavior should not have been changed, rather that the documentation needed updating (i.e., choose option 4 instead). I volunteer to undo the change and update the documentation ASAP.
The comment for bug 810843 says "This is documented behavior", but I couldn't find any such documentation pre-dating this change.
Thanks!
-- David Goodger <http://python.net/~goodger> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature Url : http://mail.python.org/pipermail/python-dev/attachments/20040802/426c69c5/signature.pgp
- Previous message: [Python-Dev] Fix import errors to have data
- Next message: [Python-Dev] ConfigParser behavior change
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]