This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fdrake
Recipients dwayne, eric.araujo, fdrake, lukasz.langa, mkindahl
Date 2010-09-03.03:25:25
SpamBayes Score 5.434345e-08
Marked as misclassified No
Message-id <1283484327.58.0.338245250619.issue7005@psf.upfronthosting.co.za>
In-reply-to
Content
I've attached a diagnostic script that I ran with Python 2.4..3.2 (current py3k HEAD); there are two output variants:

"old style":

    [section]
    option = None

"new style":

    [section]
    option

This is the output I get when running this script for each of those Python versions:

    2.4.6 RawConfigParser: old-style output
    2.4.6 SafeConfigParser: raised TypeError on set
    2.4.6 ConfigParser: old-style output

    2.5.5 RawConfigParser: old-style output
    2.5.5 SafeConfigParser: raised TypeError on set
    2.5.5 ConfigParser: old-style output

    2.6.5 RawConfigParser: old-style output
    2.6.5 SafeConfigParser: raised TypeError on set
    2.6.5 ConfigParser: old-style output

    2.7 RawConfigParser: new-style output
    2.7 SafeConfigParser: raised TypeError on set
    2.7 ConfigParser: new-style output

    3.1.1 RawConfigParser: old-style output
    3.1.1 SafeConfigParser: raised TypeError on set
    3.1.1 ConfigParser: old-style output

    3.2a1+ RawConfigParser: new-style output
    3.2a1+ SafeConfigParser: raised TypeError on set
    3.2a1+ ConfigParser: new-style output

Essentially: For the RawConfigParser and ConfigParser classes, the output changes in 2.7 and 3.2, and in a way that should be considered incorrect because it conflicts with the allow_no_values setting.

This is a bug and should be fixed in both 2.7 and 3.2.

The TypeError-on-set is consistently raised only for SafeConfigParser, and should remain unchanged.  (Why this was handled differently for SafeConfigParser I don't recall offhand.)
History
Date User Action Args
2010-09-03 03:25:27fdrakesetrecipients: + fdrake, eric.araujo, dwayne, mkindahl, lukasz.langa
2010-09-03 03:25:27fdrakesetmessageid: <1283484327.58.0.338245250619.issue7005@psf.upfronthosting.co.za>
2010-09-03 03:25:26fdrakelinkissue7005 messages
2010-09-03 03:25:25fdrakecreate