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.

classification
Title: ConfigParser does not quote %
Type: Stage:
Components: None Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, georg.brandl, mark-roberts
Priority: normal Keywords: patch

Created on 2007-01-15 07:43 by mark-roberts, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug_1603688_cfgparser_errors.patch mark-roberts, 2007-01-15 07:43 ValueError version of the patch
bug_1603688_cfgparser_munges.patch mark-roberts, 2007-01-15 07:44 Munging version of the patch
Messages (5)
msg51746 - (view) Author: Mark Roberts (mark-roberts) Date: 2007-01-15 07:43
This is covered by bug 1603688 (https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603688&group_id=5470)

I implemented 2 versions of this patch.  One version raises ValueError when an invalid interpolation syntax is encountered (such as foo%, foo%bar, and %foo, but not %%foo and %(dir)foo).

The other version simply replaces appropriate %s with %%s.

Initially, I believed ValueError was the appropriate way to go with this.  However, when I thought about how I use ConfigParser, I realized that it would be far nicer if it simply worked.

I'm +0.5 to ValueError, and +1 to munging the values.
msg51747 - (view) Author: Mark Roberts (mark-roberts) Date: 2007-01-15 07:44
File Added: bug_1603688_cfgparser_munges.patch
msg51748 - (view) Author: Mark Roberts (mark-roberts) Date: 2007-01-16 02:17
For the record, this was supposed to be a patch.  I don't know if the admins have any way of moving it to that category.  I guess that explained the funky categories and groups.  Sorry for the inconvenience.
msg51749 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2007-01-22 19:44
Turning into a patch.
msg51750 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-13 17:44
Explicit is better than implicit.
I committed a similar patch that raises ValueError, and your new test cases in rev. 54339.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44469
2007-01-15 07:43:36mark-robertscreate