Facundo Batista
b12f0b581a
Issue 1781. Now ConfigParser.add_section does not let you add a
...
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.
2008-02-23 12:46:10 +00:00
Brett Cannon
229cee2d3d
Deprecate BaseException.message as per PEP 352.
2007-05-05 01:34:02 +00:00
Georg Brandl
92a6baed7b
Patch #1603688 : ConfigParser.SafeConfigParser now checks values that
...
are set for invalid interpolation sequences that would lead to errors
on reading back those values.
2007-03-13 17:43:32 +00:00
Martin v. Löwis
a00bcac003
Patch #1371075 : Make ConfigParser accept optional dict type
...
for ordering, sorting, etc.
2006-12-03 12:01:53 +00:00
Georg Brandl
7eb4b7d177
Fix all wrong instances of "it's".
2005-07-22 21:49:32 +00:00
David Goodger
1cbf206d32
SF bug #997050 : Document, test, & check for non-string values in ConfigParser. Moved the new string-only restriction added in rev. 1.65 to the SafeConfigParser class, leaving existing ConfigParser & RawConfigParser behavior alone, and documented the conditions under which non-string values work.
2004-10-03 15:55:09 +00:00
David Goodger
68a1abdade
SF bug #1017864 : ConfigParser now correctly handles default keys, processing them with `ConfigParser.optionxform` when supplied, consistent with the handling of config file entries and runtime-set options.
2004-10-03 15:40:25 +00:00
Fred Drake
82903148a8
ConfigParser:
...
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651 )
2004-05-18 04:24:02 +00:00
Fred Drake
abc086fb0d
ConfigParser:
...
- don't allow setting options to non-string values; raise TypeError
when the value is set, instead of raising an arbitrary exception
later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843 )
2004-05-18 03:29:52 +00:00
Fred Drake
bc12b01d83
ConfigParser:
...
- ensure that option names in interpolations are handled by
self.optionxform in the same way that other references to option
names
- add tests, documentation
(closes SF bug #857881 , patch #865455 )
2004-05-18 02:25:51 +00:00
Raymond Hettinger
bac788a3cd
Replace str.find()!=1 with the more readable "in" operator.
2004-05-04 09:21:43 +00:00
Walter Dörwald
70a6b49821
Replace backticks with repr() or "%r"
...
From SF patch #852334 .
2004-02-12 17:35:32 +00:00
Fred Drake
8c4da53afe
Make both items() methods return lists; one had changed to return an
...
iterator where it probably shouldn't have.
Closes SF bug #818861 .
2003-10-21 16:45:00 +00:00
Walter Dörwald
f0dfc7ac5c
Fix a bunch of typos in documentation, docstrings and comments.
...
(From SF patch #810751 )
2003-10-20 14:01:56 +00:00
Raymond Hettinger
99c2d531d1
SF patch #790443 : add SafeConfigParser to __all__
...
(Contributed by George Yoshida.)
2003-09-01 23:30:44 +00:00
Neal Norwitz
10f3018023
Fix arguments for instantiating InterpolationSyntaxError
2003-06-29 04:23:35 +00:00
Fred Drake
e2c649126e
Further cleanup of exceptions. All interpolation-related exceptions
...
now derive from InterpolationError, which is not raised directly (only
subclasses get raised). This matches what the docs already said.
2002-12-31 17:23:27 +00:00
Fred Drake
00dc5a93c1
ConfigParser._interpolate(): Pass the missing key to the
...
InterpolationError constructor, not the KeyError exception itself.
(Caught by the new InterpolationError test.)
SafeConfigParser._interpolate_some(): Pass the right number of
arguments to the InterpolationError constructor.
(Caught by pychecker.)
2002-12-31 06:55:41 +00:00
Fred Drake
8d5dd98a2e
- added InterpolationSyntaxError to __all__
...
- added docstring to exceptions
2002-12-30 23:51:45 +00:00
Neal Norwitz
ce1d944b6b
Add missing InterpolationSyntaxError.
...
XXX Not sure this is correct.
2002-12-30 23:38:47 +00:00
Neal Norwitz
f680cc460c
Update doc for getboolean() to match code (ie, returning True/False)
...
Convert remaining uses of 1/0 to True/False
2002-12-17 01:56:47 +00:00
Tim Peters
230a60c6ec
Whitespace normalization.
2002-11-09 05:08:07 +00:00
Andrew M. Kuchling
9050a517c8
Fix docstring typos
2002-11-06 14:51:20 +00:00
Fred Drake
0eebd5cef9
Implement a safer and more predictable interpolation approach.
...
Closes SF bug #511737 .
2002-10-25 21:52:00 +00:00
Fred Drake
df393bd46a
According to the docs, __name__ is not exposed via the API except
...
indirectly via %(__name__)s. Not sure why, but maintain the
documented behavior for the new items() method.
Be a little more efficient about how we compute the list of options in
the ConfigParser.items() method.
2002-10-25 20:41:30 +00:00