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 terry.reedy
Recipients lukasz.langa, spaceone, terry.reedy, vstinner
Date 2015-11-25.18:03:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448474627.76.0.322924449712.issue25723@psf.upfronthosting.co.za>
In-reply-to
Content
Newline (\n) and possibly \x00, if it necessarily causes an actual problem, are the only characters that we might reject by default.  Rejecting anything else is unwarrented editorializing about what people 'should' use.  As you said, people who want something stricter can replace .add_section.  (This would be most useful in a group or corporate setting which might, for instance, want to severely limit the character set allowed.)

In particular, I showed in #20923 how to replace .SECTCRE to make "[Test[2]_foo]" yield "Test[2]_foo".  The OP for that issue filed it after seeing an application that used such section names and they are not at all unreasonable. Python should be able to continue writing .ini files for that application as well as any others.

Victor, your point that even a minimal change could break working code is a good one.  It suggests to me that we should maybe do nothing.  This issue is motivated by a theoretical principle "User input should always be validated" that is not a Python design principle (what is valid, who decides), not by actual problems in the field.
History
Date User Action Args
2015-11-25 18:03:47terry.reedysetrecipients: + terry.reedy, vstinner, lukasz.langa, spaceone
2015-11-25 18:03:47terry.reedysetmessageid: <1448474627.76.0.322924449712.issue25723@psf.upfronthosting.co.za>
2015-11-25 18:03:47terry.reedylinkissue25723 messages
2015-11-25 18:03:47terry.reedycreate