summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixes #4686. Reverts redundant picklability code from r74544.Łukasz Langa2012-01-231-33/+9
|
* Fixes #13760: picklability of ConfigParser exceptionsŁukasz Langa2012-01-201-1/+33
|
* Issue 12717: Fix-up an earlier backport in ConfigParser.Raymond Hettinger2011-08-091-1/+1
|
* Issue 11089: Fix performance bug in ConfigParser that impaired itsRaymond Hettinger2011-02-021-3/+37
| | | | | | | | | usability for large config files. The ConfigParser.get() method should have been O(1) but had O(n) dict copies and updates on every call. This was exacerbated by using OrderedDicts which do not copy or update nearly as fast as regular dicts which are coded in C.
* fix output from RawConfigParser.write and ConfigParser.write for NoneFred Drake2010-09-031-1/+1
| | | | values (http://bugs.python.org/issue7005)
* Issue #9551: Do not raise TypeError when setting the value to None forFred Drake2010-08-101-9/+9
| | | | SafeConfigParser instances constructed with allow_no_value == True.
* Merged revisions 83226-83227,83229-83230,83232 via svnmerge fromGeorg Brandl2010-08-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83226 | georg.brandl | 2010-07-29 16:17:12 +0200 (Do, 29 Jul 2010) | 1 line #1090076: explain the behavior of *vars* in get() better. ........ r83227 | georg.brandl | 2010-07-29 16:23:06 +0200 (Do, 29 Jul 2010) | 1 line Use Py_CLEAR(). ........ r83229 | georg.brandl | 2010-07-29 16:32:22 +0200 (Do, 29 Jul 2010) | 1 line #9407: document configparser.Error. ........ r83230 | georg.brandl | 2010-07-29 16:36:11 +0200 (Do, 29 Jul 2010) | 1 line Use correct directive and name. ........ r83232 | georg.brandl | 2010-07-29 16:49:08 +0200 (Do, 29 Jul 2010) | 1 line #9388: remove ERA_YEAR which is never defined in the source code. ........
* Fix #7113. Patch by Łukasz Langa.Brian Curtin2010-07-261-14/+23
| | | | | Changes include using a list of lines instead of patching together using string interpolation, and a multi-line value test cases.
* - apply patch from issue 7005Fred Drake2010-02-191-18/+44
| | | | - add corresponding documentation
* #5741 followup: should also allow %%(blah)s.Georg Brandl2009-04-131-2/+2
|
* #5741: dont disallow double percent signs in SafeConfigParser.set() keys.Georg Brandl2009-04-121-4/+4
|
* Backport 70111: Let configparser use ordered dicts by default.Raymond Hettinger2009-03-031-1/+7
|
* Remove a __getitem__() removal on an exception to silence a warning triggeredBrett Cannon2008-08-021-1/+1
| | | | under -3.
* ConfigParser renaming reversal part 3: move module into place and adapt imports.Georg Brandl2008-05-251-0/+669
|
* Renamed the ConfigParser module to 'configparser'.Alexandre Vassalotti2008-05-141-669/+0
|
* Issue 1781. Now ConfigParser.add_section does not let you add aFacundo Batista2008-02-231-1/+5
| | | | | DEFAULT section any more, because it duplicated sections with the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.
* Deprecate BaseException.message as per PEP 352.Brett Cannon2007-05-051-0/+15
|
* Patch #1603688: ConfigParser.SafeConfigParser now checks values thatGeorg Brandl2007-03-131-2/+11
| | | | | are set for invalid interpolation sequences that would lead to errors on reading back those values.
* Patch #1371075: Make ConfigParser accept optional dict typeMartin v. Löwis2006-12-031-7/+8
| | | | for ordering, sorting, etc.
* Fix all wrong instances of "it's".Georg Brandl2005-07-221-1/+1
|
* SF bug #997050: Document, test, & check for non-string values in ↵David Goodger2004-10-031-3/+8
| | | | 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.
* SF bug #1017864: ConfigParser now correctly handles default keys, processing ↵David Goodger2004-10-031-7/+9
| | | | them with ``ConfigParser.optionxform`` when supplied, consistent with the handling of config file entries and runtime-set options.
* ConfigParser:Fred Drake2004-05-181-1/+6
| | | | | | - read() method returns a list of files parsed successfully - add tests, documentation (closes SF patch #677651)
* ConfigParser:Fred Drake2004-05-181-0/+2
| | | | | | | | - 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)
* ConfigParser:Fred Drake2004-05-181-1/+11
| | | | | | | | - 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)
* Replace str.find()!=1 with the more readable "in" operator.Raymond Hettinger2004-05-041-2/+2
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-5/+5
| | | | From SF patch #852334.
* Make both items() methods return lists; one had changed to return anFred Drake2003-10-211-5/+4
| | | | | iterator where it probably shouldn't have. Closes SF bug #818861.
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-201-1/+1
| | | | (From SF patch #810751)
* SF patch #790443: add SafeConfigParser to __all__Raymond Hettinger2003-09-011-1/+1
| | | | (Contributed by George Yoshida.)
* Fix arguments for instantiating InterpolationSyntaxErrorNeal Norwitz2003-06-291-3/+3
|
* Further cleanup of exceptions. All interpolation-related exceptionsFred Drake2002-12-311-30/+37
| | | | | now derive from InterpolationError, which is not raised directly (only subclasses get raised). This matches what the docs already said.
* ConfigParser._interpolate(): Pass the missing key to theFred Drake2002-12-311-4/+3
| | | | | | | | | 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.)
* - added InterpolationSyntaxError to __all__Fred Drake2002-12-301-4/+25
| | | | - added docstring to exceptions
* Add missing InterpolationSyntaxError.Neal Norwitz2002-12-301-0/+2
| | | | XXX Not sure this is correct.
* Update doc for getboolean() to match code (ie, returning True/False)Neal Norwitz2002-12-171-8/+8
| | | | Convert remaining uses of 1/0 to True/False
* Whitespace normalization.Tim Peters2002-11-091-1/+1
|
* Fix docstring typosAndrew M. Kuchling2002-11-061-2/+2
|
* Implement a safer and more predictable interpolation approach.Fred Drake2002-10-251-0/+48
| | | | Closes SF bug #511737.
* According to the docs, __name__ is not exposed via the API exceptFred Drake2002-10-251-2/+8
| | | | | | | | 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.
* Re-factor: Use a RawConfigParser base class and make ConfigParser aFred Drake2002-10-251-103/+133
| | | | | derived class that adds the ugly string interpolation code. In the process, changed all "__" methods and instance variables to "_".
* Allow internal whitespace in keys.Fred Drake2002-09-271-3/+4
| | | | Closes SF bug #583248; backporting to r22-maint branch.
* items(): New method, provided by Gustavo Niemeyer in SF bug #545096.Fred Drake2002-09-271-0/+33
|
* has_option(): Use the option name transform consistently.Fred Drake2002-09-271-53/+49
| | | | | | | | Closes SF bug #561822. Integrate the "code cleanup and general bug fix patch" (SF bug #545096), contributed by Gustavo Niemeyer. This is the portion of that patch that does not add new functionality.
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | x in string.whitespace => x.isspace() type(x) in types.StringTypes => isinstance(x, basestring) isinstance(x, types.StringTypes) => isinstance(x, basestring) type(x) is types.StringType => isinstance(x, str) type(x) == types.StringType => isinstance(x, str) string.split(x, ...) => x.split(...) string.join(x, y) => y.join(x) string.zfill(x, ...) => x.zfill(...) string.count(x, ...) => x.count(...) hasattr(types, "UnicodeType") => try: unicode except NameError: type(x) != types.TupleTuple => not isinstance(x, tuple) isinstance(x, types.TupleType) => isinstance(x, tuple) type(x) is types.IntType => isinstance(x, int) Do not mention the string module in the rlcompleter docstring. This partially applies SF patch http://www.python.org/sf/562373 (with basestring instead of string). (It excludes the changes to unittest.py and does not change the os.stat stuff.)
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-8/+8
|
* Replaced boolean test with 'is None'Raymond Hettinger2002-06-011-1/+1
|
* Clean up uses of some deprecated features.Fred Drake2002-04-261-2/+2
| | | | Reported by Neal Norwitz on python-dev.
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* [Bug #523301] ConfigParser.write() produces broken output for values thatAndrew M. Kuchling2002-03-081-2/+2
| | | | | were originally rfc822-like line continuations. Modified version of a patch from Matthias Ralfs.