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 vstinner
Recipients lukasz.langa, spaceone, terry.reedy, vstinner
Date 2015-11-25.07:57:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448438258.47.0.694056318336.issue25723@psf.upfronthosting.co.za>
In-reply-to
Content
Terry: "Since anything else without ']' is valid (...)"

A Python script can be used to generate a configuration read by another application. This application can more more strict on the configuration format than Python, so I would prefer to deny '\n', '[' and ']' characters in section names.

I'm not sure that it's ok to modify Python < 3.6 since it can break applications relying on this ugly "feature". I propose to only modify Python 3.6.

If you need strict ConfigParser, you can inherit from the class to override add_section() to add checks on the section name.

@SpaceOne: Are you interested to work on a patch?
History
Date User Action Args
2015-11-25 07:57:38vstinnersetrecipients: + vstinner, terry.reedy, lukasz.langa, spaceone
2015-11-25 07:57:38vstinnersetmessageid: <1448438258.47.0.694056318336.issue25723@psf.upfronthosting.co.za>
2015-11-25 07:57:38vstinnerlinkissue25723 messages
2015-11-25 07:57:38vstinnercreate