| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651)
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
|
|
|
|
| |
- 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)
|
| |
|
|
|
|
| |
From SF patch #852334.
|
|
|
|
|
| |
iterator where it probably shouldn't have.
Closes SF bug #818861.
|
|
|
|
| |
(From SF patch #810751)
|
|
|
|
| |
(Contributed by George Yoshida.)
|
| |
|
|
|
|
|
| |
now derive from InterpolationError, which is not raised directly (only
subclasses get raised). This matches what the docs already said.
|
|
|
|
|
|
|
|
|
| |
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 docstring to exceptions
|
|
|
|
| |
XXX Not sure this is correct.
|
|
|
|
| |
Convert remaining uses of 1/0 to True/False
|
| |
|
| |
|
|
|
|
| |
Closes SF bug #511737.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
derived class that adds the ugly string interpolation code. In the
process, changed all "__" methods and instance variables to "_".
|
|
|
|
| |
Closes SF bug #583248; backporting to r22-maint branch.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
| |
|
|
|
|
| |
Reported by Neal Norwitz on python-dev.
|
| |
|
|
|
|
|
| |
were originally rfc822-like line continuations.
Modified version of a patch from Matthias Ralfs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows ConfigParser.getboolean() to interpret TRUE,
FALSE, YES, NO, ON and OFF instead just '0' and '1'.
While just allowing '0' and '1' sounds more correct users often
demand to use more descriptive directives in configuration
files. Instead of forcing every programmer do brew his own
solution a system should include the batteries for this.
[My modification to the patch is a slight rewording of the docstring
and use of lowercase instead of uppercase templates. The code is
still case sensitive. GvR.]
|
|
|
|
|
|
|
|
| |
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
|
| |
|
| |
|
|
|
|
|
|
|
| |
name when filling in the internal data structures, otherwise we incorrectly
raise a KeyError.
This fixes SF bug #432369.
|
|
|
|
|
|
| |
.has_option(), .remove_option(), and .set().
This closes SF tracker #232913.
|
|
|
|
|
|
|
|
| |
at least one addition to the set of accepted characters for every release
since this module was first added; this should take care of the problem
in a more substantial way.
This closes SF bug #132288.
|
|
|
|
|
|
|
| |
ConfigParser with GNOME-ish config files that use the internationalization
conventions found in GNOME.
This closes SF bug #131635.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
added test script and expected output file as well
this closes patch 103297.
__all__ attributes will be added to other modules without first submitting
a patch, just adding the necessary line to the test script to verify
more-or-less correct implementation.
|
| |
|
| |
|
|
|
|
| |
This closes bug #124324.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not expose the __name__ when reporting the list of options available
for a section since that is for internal use.
This closes SourceForge bug #115357.
Additionally, define InterpolationDepthError and MAX_INTERPOLATION_DEPTH.
The exception is raised by get*() when value interpolation cannot be
completed within the defined recursion limit. The constant is only
informative; changing it will not affect the allowed depth.
Fix the exit from get() so that None is not returned if the depth is met
or exceeded; either return the value of raise InterpolationDepthError.
|
|
|
|
|
|
|
| |
self.optionxform(), which (in the default case) caused options spelled
with opper case letters in their name to be inaccessible. Reported by
"Todd R. Palmer" <t2palmer@bellsouth.net> on
activepython@listserv1.ActiveState.com.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a representation of the configuration state in .ini format that can be read
back in by a future read() call. Thus this class is now a back end
for .ini editors as well as parsers.
This patch is complete and tested, but exposes a bug in the ConfigParser
implementation which I have not yet fixed. Because case information is
discarded during parsing, the output of write() has its case smashed.
I wrote this for a SourceForge interface script called forgetool.
Documentation for the new entry points included.
|
|
|
|
|
| |
Instead of wrapping 'filenames' value in a list if it's a
string, wrap it if it's a string or unicode string.
|
| |
|