diff options
author | Raymond Hettinger <python@rcn.com> | 2010-12-18 10:48:26 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-12-18 10:48:26 (GMT) |
commit | d73be67c3ff6eb8d2f6c8f49e8c7f1cdfa8921a9 (patch) | |
tree | b8dcadc0f04d73a11e30e04a271a1686b0cb4635 /Doc | |
parent | 3094ed8c6934f40ab7583c1c56c1aa99f71bac38 (diff) | |
download | cpython-d73be67c3ff6eb8d2f6c8f49e8c7f1cdfa8921a9.zip cpython-d73be67c3ff6eb8d2f6c8f49e8c7f1cdfa8921a9.tar.gz cpython-d73be67c3ff6eb8d2f6c8f49e8c7f1cdfa8921a9.tar.bz2 |
Minor wordsmithing and markup fix-ups.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.2.rst | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index bfc4e0d..d4b0635 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -1,4 +1,4 @@ -http://news.blogs.cnn.com/2010/12/17/final-lunar-eclipse-of-2010-set-for-early-morning-of-december-21/?hpt=T2http://news.blogs.cnn.com/2010/12/17/final-lunar-eclipse-of-2010-set-for-early-morning-of-december-21/?hpt=T2**************************** +**************************** What's New In Python 3.2 **************************** @@ -1617,33 +1617,36 @@ Porting to Python 3.2 This section lists previously described changes and other bugfixes that may require changes to your code: -* The :mod:`configparser` class :class:`SafeConfigParser` has been updated and - renamed to :class:`ConfigParser` whereas the old :class:`ConfigParser` class - has been removed. This means a couple of minor incompatibilities: +* The :mod:`configparser` module has a number of clean-ups. The major change is + to replace the old :class:`ConfigParser` class with long-standing preferred + alternative :class:`SafeConfigParser`. In addition there are a number of + smaller incompatibilites: - * interpolation syntax is now validated on :meth:`get` and :meth:`set` - operations. In the default interpolation scheme, only two tokens with - percent signs are valid: %(name)s and %%, the latter being an escaped - percent sign. If that is not welcome, consider using - :class:`ExtendedInterpolation` or none at all. + * The interpolation syntax is now validated on + :meth:`~configparser.ConfigParser.get` and + :meth:`~configparser.ConfigParser.set` operations. In the default + interpolation scheme, only two tokens with percent signs are valid: ``%(name)s`` + and ``%%``, the latter being an escaped percent sign. - * :meth:`set` and :meth:`add_section` now check whether the given value type - is a string. :mod:`configparser` was never designed to hold non-string - values internally. + * The :meth:`~configparser.ConfigParser.set` and + :meth:`~configparser.ConfigParser.add_section` methods now verify that + values are actual strings. Formerly, unsupported types could be introduced + unintentionally. - * exception is raised on any section or option duplicates that appear when - reading a single source. This exposes mistakes in user configuration. + * Duplicate sections or options now raise either + :exc:`~configparser.DuplicateSectionError` or + :exc:`~configparser.DuplicateOptionError`. Formerly, duplicates would + silently overwrite a previous entry. - * inline comments are now disabled by default which means the ``;`` character - can be safeuly used in values (``#`` was never allowed as inline comment). + * Inline comments are now disabled by default so now the **;** character + can be safely used in values. - * comments now can be indented which means for ``;`` and ``#`` to appear at - the start of a line in multiline values, it has to be interpolated. This is - preferable because in INI files a character that is also a comment prefix - cannot be taken for a comment by mistake. + * Comments now can be indented. Consequently, for **;** or **#** to appear at + the start of a line in multiline values, it has to be interpolated. This + keep comment prefix characters in value from being mistaken as comments. - * ``""`` is now a valid value, no longer automatically converted to an empty - string. For empty strings users can use ``"option ="`` in a line. + * ``""`` is now a valid value and is no longer automatically converted to an + empty string. For empty strings, use ``"option ="`` in a line. * The :mod:`nntplib` module was reworked extensively, meaning that its APIs are often incompatible with the 3.1 APIs. |