[Python-checkins] cpython: Fix a couple of versionadded/versionchanged related markup errors.

georg.brandl python-checkins at python.org
Sun Jun 24 22:50:41 CEST 2012


http://hg.python.org/cpython/rev/653cf179491d
changeset:   77753:653cf179491d
parent:      77751:46b809f9074b
user:        Georg Brandl <georg at python.org>
date:        Sun Jun 24 22:48:30 2012 +0200
summary:
  Fix a couple of versionadded/versionchanged related markup errors.

files:
  Doc/c-api/arg.rst              |   5 +++--
  Doc/library/abc.rst            |   4 ++--
  Doc/library/email.errors.rst   |   4 ++--
  Doc/library/email.parser.rst   |   3 ++-
  Doc/library/email.util.rst     |   8 ++++++--
  Doc/library/html.parser.rst    |   3 ++-
  Doc/library/http.server.rst    |   3 ++-
  Doc/library/importlib.rst      |   4 ++--
  Doc/library/mailbox.rst        |   3 ++-
  Doc/library/os.path.rst        |   3 ++-
  Doc/library/select.rst         |   1 -
  Doc/library/smtplib.rst        |   3 ++-
  Doc/library/time.rst           |  13 +++++--------
  Doc/library/urllib.request.rst |   9 ++++-----
  Doc/library/winreg.rst         |   3 ++-
  Doc/library/xml.sax.utils.rst  |   2 +-
  16 files changed, 39 insertions(+), 32 deletions(-)


diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -264,7 +264,8 @@
    Convert a Python byte, represented as a :class:`bytes` or
    :class:`bytearray` object of length 1, to a C :c:type:`char`.
 
-   .. versionchanged:: 3.3 Allow :class:`bytearray` objects
+   .. versionchanged:: 3.3
+      Allow :class:`bytearray` objects.
 
 ``C`` (:class:`str` of length 1) [int]
    Convert a Python character, represented as a :class:`str` object of
@@ -324,7 +325,7 @@
    This accepts any valid Python value.  See :ref:`truth` for more
    information about how Python tests values for truth.
 
-   .. versionchanged:: 3.3
+   .. versionadded:: 3.3
 
 ``(items)`` (:class:`tuple`) [*matching-items*]
    The object must be a Python sequence whose length is the number of format units
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -217,7 +217,7 @@
 
    .. versionadded:: 3.2
    .. deprecated:: 3.3
-       Use :class:`classmethod` with :func:`abstractmethod` instead
+       Use :class:`classmethod` with :func:`abstractmethod` instead.
 
 
 .. decorator:: abstractstaticmethod(function)
@@ -234,7 +234,7 @@
 
    .. versionadded:: 3.2
    .. deprecated:: 3.3
-       Use :class:`staticmethod` with :func:`abstractmethod` instead
+       Use :class:`staticmethod` with :func:`abstractmethod` instead.
 
 
 .. decorator:: abstractproperty(fget=None, fset=None, fdel=None, doc=None)
diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst
--- a/Doc/library/email.errors.rst
+++ b/Doc/library/email.errors.rst
@@ -76,7 +76,7 @@
 * :class:`CloseBoundaryNotFoundDefect` -- A start boundary was found, but
   no corresponding close boundary was ever found.
 
-  .. versionadded: 3.3
+  .. versionadded:: 3.3
 
 * :class:`FirstHeaderLineIsContinuationDefect` -- The message had a continuation
   line as its first header line.
@@ -88,7 +88,7 @@
   headers that had no leading white space but contained no ':'.  Parsing
   continues assuming that the line represents the first line of the body.
 
-  .. versionadded: 3.3
+  .. versionadded:: 3.3
 
 * :class:`MalformedHeaderDefect` -- A header was found that was missing a colon,
   or was otherwise malformed.
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -107,7 +107,8 @@
 message body, instead setting the payload to the raw body as a string.  They
 have the same API as the :class:`Parser` and :class:`BytesParser` classes.
 
-.. versionadded:: 3.3 BytesHeaderParser
+.. versionadded:: 3.3
+   The BytesHeaderParser class.
 
 
 .. class:: Parser(_class=email.message.Message, *, policy=policy.default)
diff --git a/Doc/library/email.util.rst b/Doc/library/email.util.rst
--- a/Doc/library/email.util.rst
+++ b/Doc/library/email.util.rst
@@ -41,7 +41,8 @@
    characters.  Can be an instance of :class:`str` or a
    :class:`~email.charset.Charset`.  Defaults to ``utf-8``.
 
-   .. versionchanged: 3.3 added the *charset* option
+   .. versionchanged:: 3.3
+      Added the *charset* option.
 
 
 .. function:: getaddresses(fieldvalues)
@@ -93,6 +94,8 @@
    corresponding a :class:`~datetime.timezone` :class:`~datetime.tzinfo`.
 
    .. versionadded:: 3.3
+
+
 .. function:: mktime_tz(tuple)
 
    Turn a 10-tuple as returned by :func:`parsedate_tz` into a UTC timestamp.  It
@@ -164,7 +167,8 @@
    may be useful certain cases, such as a constructing distributed system that
    uses a consistent domain name across multiple hosts.
 
-   .. versionchanged:: 3.2 domain keyword added
+   .. versionchanged:: 3.2
+      Added the *domain* keyword.
 
 
 .. function:: decode_rfc2231(s)
diff --git a/Doc/library/html.parser.rst b/Doc/library/html.parser.rst
--- a/Doc/library/html.parser.rst
+++ b/Doc/library/html.parser.rst
@@ -33,7 +33,8 @@
    This parser does not check that end tags match start tags or call the end-tag
    handler for elements which are closed implicitly by closing an outer element.
 
-   .. versionchanged:: 3.2 *strict* keyword added
+   .. versionchanged:: 3.2
+      *strict* keyword added.
 
    .. deprecated-removed:: 3.3 3.5
       The *strict* argument and the strict mode have been deprecated.
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -201,7 +201,8 @@
       specifying its value. Note that, after the send_header calls are done,
       :meth:`end_headers` MUST BE called in order to complete the operation.
 
-      .. versionchanged:: 3.2 Headers are stored in an internal buffer.
+      .. versionchanged:: 3.2
+         Headers are stored in an internal buffer.
 
 
    .. method:: send_response_only(code, message=None)
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -785,8 +785,8 @@
     loader should initialize as specified by :pep:`302` as best as possible.
 
     .. versionchanged:: 3.3
-      :attr:`__loader__` and :attr:`__package__` are automatically set
-      (when possible).
+       :attr:`__loader__` and :attr:`__package__` are automatically set
+       (when possible).
 
 .. decorator:: set_loader
 
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -89,7 +89,8 @@
       format-specific information is used. Otherwise, reasonable defaults for
       format-specific information are used.
 
-      .. versionchanged:: 3.2 support for binary input
+      .. versionchanged:: 3.2
+         Support for binary input was added.
 
 
    .. method:: remove(key)
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -254,7 +254,8 @@
 
    Availability: Unix, Windows.
 
-   .. versionchanged:: 3.2 Added Windows support.
+   .. versionchanged:: 3.2
+      Added Windows support.
 
 
 .. function:: samestat(stat1, stat2)
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -50,7 +50,6 @@
 
 
    .. versionchanged:: 3.3
-
       Added the *flags* parameter.
 
 
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -362,7 +362,8 @@
    Unless otherwise noted, the connection will be open even after an exception is
    raised.
 
-   .. versionchanged:: 3.2 *msg* may be a byte string.
+   .. versionchanged:: 3.2
+      *msg* may be a byte string.
 
 
 .. method:: SMTP.send_message(msg, from_addr=None, to_addrs=None, \
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -78,10 +78,9 @@
   See :class:`struct_time` for a description of these objects.
 
   .. versionchanged:: 3.3
-
-  The :class:`struct_time` type was extended to provide the
-  :attr:`tm_gmtoff` and :attr:`tm_zone` attributes when platform
-  supports corresponding ``struct tm`` members.
+     The :class:`struct_time` type was extended to provide the :attr:`tm_gmtoff`
+     and :attr:`tm_zone` attributes when platform supports corresponding
+     ``struct tm`` members.
 
 * Use the following functions to convert between time representations:
 
@@ -558,10 +557,8 @@
    :exc:`TypeError` is raised.
 
   .. versionchanged:: 3.3
-
-  :attr:`tm_gmtoff` and :attr:`tm_zone` attributes are avaliable on
-  platforms with C library supporting the corresponding fields in
-  ``struct tm``.
+     :attr:`tm_gmtoff` and :attr:`tm_zone` attributes are avaliable on platforms
+     with C library supporting the corresponding fields in ``struct tm``.
 
 .. function:: time()
 
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -212,7 +212,7 @@
    :attr:`~Request.method` attribute and is used by :meth:`get_method()`.
 
    .. versionchanged:: 3.3
-    :attr:`Request.method` argument is added to the Request class.
+      :attr:`Request.method` argument is added to the Request class.
 
 
 .. class:: OpenerDirector()
@@ -967,10 +967,9 @@
    Open the file locally, if there is no host name, or the host name is
    ``'localhost'``.
 
-   This method is applicable only for local hostnames. When a remote hostname
-   is given, an :exc:`URLError` is raised.
-
-.. versionchanged:: 3.2
+   .. versionchanged:: 3.2
+      This method is applicable only for local hostnames.  When a remote
+      hostname is given, an :exc:`URLError` is raised.
 
 
 .. _ftp-handler-objects:
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -290,7 +290,8 @@
 
    If the function fails, :exc:`OSError` is raised.
 
-   .. versionchanged:: 3.2 Allow the use of named arguments.
+   .. versionchanged:: 3.2
+      Allow the use of named arguments.
 
    .. versionchanged:: 3.3
       This function used to raise a :exc:`WindowsError`, which is now an
diff --git a/Doc/library/xml.sax.utils.rst b/Doc/library/xml.sax.utils.rst
--- a/Doc/library/xml.sax.utils.rst
+++ b/Doc/library/xml.sax.utils.rst
@@ -62,7 +62,7 @@
    tags, if set to *True* they are emitted as a single self-closed tag.
 
    .. versionadded:: 3.2
-      short_empty_elements
+      The *short_empty_elements* parameter.
 
 
 .. class:: XMLFilterBase(base)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list