[Python-checkins] cpython (merge 3.3 -> default): Merge #18179: reflow paragraphs.

r.david.murray python-checkins at python.org
Sun Jun 23 22:12:56 CEST 2013


http://hg.python.org/cpython/rev/627e3096340e
changeset:   84293:627e3096340e
parent:      84290:b10fae8c185c
parent:      84292:ffcf46316e1f
user:        R David Murray <rdmurray at bitdance.com>
date:        Sun Jun 23 16:06:13 2013 -0400
summary:
  Merge #18179: reflow paragraphs.

files:
  Doc/library/smtplib.rst |  48 ++++++++++++++--------------
  Lib/smtplib.py          |  45 +++++++++++++-------------
  2 files changed, 47 insertions(+), 46 deletions(-)


diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -24,20 +24,20 @@
 
    A :class:`SMTP` instance encapsulates an SMTP connection.  It has methods
    that support a full repertoire of SMTP and ESMTP operations. If the optional
-   host and port parameters are given, the SMTP :meth:`connect` method is called
-   with those parameters during initialization.  If specified, *local_hostname* is
-   used as the FQDN of the local host in the HELO/EHLO command.  Otherwise, the
-   local hostname is found using :func:`socket.getfqdn`.  If the
-   :meth:`connect` call
-   returns anything other than a success code, an :exc:`SMTPConnectError` is
-   raised. The optional *timeout* parameter specifies a timeout in seconds for
-   blocking operations like the connection attempt (if not specified, the
-   global default timeout setting will be used). The optional source_address
-   parameter allows to bind to some specific source address in a machine with
-   multiple network interfaces, and/or to some specific source TCP port. It
-   takes a 2-tuple (host, port), for the socket to bind to as its source
-   address before connecting. If omitted (or if host or port are ``''`` and/or
-   0 respectively) the OS default behavior will be used.
+   host and port parameters are given, the SMTP :meth:`connect` method is
+   called with those parameters during initialization.  If specified,
+   *local_hostname* is used as the FQDN of the local host in the HELO/EHLO
+   command.  Otherwise, the local hostname is found using
+   :func:`socket.getfqdn`.  If the :meth:`connect` call returns anything other
+   than a success code, an :exc:`SMTPConnectError` is raised. The optional
+   *timeout* parameter specifies a timeout in seconds for blocking operations
+   like the connection attempt (if not specified, the global default timeout
+   setting will be used). The optional source_address parameter allows to bind
+   to some specific source address in a machine with multiple network
+   interfaces, and/or to some specific source TCP port. It takes a 2-tuple
+   (host, port), for the socket to bind to as its source address before
+   connecting. If omitted (or if host or port are ``''`` and/or 0 respectively)
+   the OS default behavior will be used.
 
    For normal use, you should only require the initialization/connect,
    :meth:`sendmail`, and :meth:`~smtplib.quit` methods.
@@ -70,11 +70,11 @@
    not appropriate. If *host* is not specified, the local host is used. If
    *port* is zero, the standard SMTP-over-SSL port (465) is used.  The optional
    arguments *local_hostname* and *source_address* have the same meaning as
-   they do in the :class:`SMTP` class.  *keyfile*
-   and *certfile* are also optional, and can contain a PEM formatted private key
-   and certificate chain file for the SSL connection. *context* also optional, can contain
-   a SSLContext, and is an alternative to keyfile and certfile; If it is specified both
-   keyfile and certfile must be None.  The optional *timeout*
+   they do in the :class:`SMTP` class.  *keyfile* and *certfile* are also
+   optional, and can contain a PEM formatted private key and certificate chain
+   file for the SSL connection. *context* also optional, can contain a
+   SSLContext, and is an alternative to keyfile and certfile; If it is
+   specified both keyfile and certfile must be None.  The optional *timeout*
    parameter specifies a timeout in seconds for blocking operations like the
    connection attempt (if not specified, the global default timeout setting
    will be used). The optional source_address parameter allows to bind to some
@@ -97,12 +97,12 @@
    standard SMTP client. It's common to use Unix sockets for LMTP, so our
    :meth:`connect` method must support that as well as a regular host:port
    server. The optional arguments local_hostname and source_address have the
-   same meaning as they do in the :class:`SMTP` class. To specify a Unix socket, you must use
-   an absolute path for *host*, starting with a '/'.
+   same meaning as they do in the :class:`SMTP` class. To specify a Unix
+   socket, you must use an absolute path for *host*, starting with a '/'.
 
-   Authentication is supported, using the regular SMTP mechanism. When using a Unix
-   socket, LMTP generally don't support or require any authentication, but your
-   mileage might vary.
+   Authentication is supported, using the regular SMTP mechanism. When using a
+   Unix socket, LMTP generally don't support or require any authentication, but
+   your mileage might vary.
 
 
 A nice selection of exceptions is defined as well:
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -222,14 +222,14 @@
         If specified, `host' is the name of the remote host to which to
         connect.  If specified, `port' specifies the port to which to connect.
         By default, smtplib.SMTP_PORT is used.  If a host is specified the
-        connect method is called, and if it returns anything other than
-        a success code an SMTPConnectError is raised.  If specified,
-        `local_hostname` is used as the FQDN of the local host in the
-        HELO/EHLO command.  Otherwise,
-        the local hostname is found using socket.getfqdn(). The
-        `source_address` parameter takes a 2-tuple (host, port) for the socket
-        to bind to as its source address before connecting. If the host is ''
-        and port is 0, the OS default behavior will be used.
+        connect method is called, and if it returns anything other than a
+        success code an SMTPConnectError is raised.  If specified,
+        `local_hostname` is used as the FQDN of the local host in the HELO/EHLO
+        command.  Otherwise, the local hostname is found using
+        socket.getfqdn(). The `source_address` parameter takes a 2-tuple (host,
+        port) for the socket to bind to as its source address before
+        connecting. If the host is '' and port is 0, the OS default behavior
+        will be used.
 
         """
         self.timeout = timeout
@@ -853,15 +853,17 @@
 if _have_ssl:
 
     class SMTP_SSL(SMTP):
-        """ This is a subclass derived from SMTP that connects over an SSL encrypted
-        socket (to use this class you need a socket module that was compiled with SSL
-        support). If host is not specified, '' (the local host) is used. If port is
-        omitted, the standard SMTP-over-SSL port (465) is used.  local_hostname and
-        source_address have the same meaning as they do in the SMTP class.  keyfile and certfile
-        are also optional - they can contain a PEM formatted private key and
-        certificate chain file for the SSL connection. context also optional, can contain
-        a SSLContext, and is an alternative to keyfile and certfile; If it is specified both
-        keyfile and certfile must be None.
+        """ This is a subclass derived from SMTP that connects over an SSL
+        encrypted socket (to use this class you need a socket module that was
+        compiled with SSL support). If host is not specified, '' (the local
+        host) is used. If port is omitted, the standard SMTP-over-SSL port
+        (465) is used.  local_hostname and source_address have the same meaning
+        as they do in the SMTP class.  keyfile and certfile are also optional -
+        they can contain a PEM formatted private key and certificate chain file
+        for the SSL connection. context also optional, can contain a
+        SSLContext, and is an alternative to keyfile and certfile; If it is
+        specified both keyfile and certfile must be None.
+
         """
 
         default_port = SMTP_SSL_PORT
@@ -904,12 +906,11 @@
     """LMTP - Local Mail Transfer Protocol
 
     The LMTP protocol, which is very similar to ESMTP, is heavily based
-    on the standard SMTP client. It's common to use Unix sockets for LMTP,
-    so our connect() method must support that as well as a regular
+    on the standard SMTP client. It's common to use Unix sockets for
+    LMTP, so our connect() method must support that as well as a regular
     host:port server.  local_hostname and source_address have the same
-    meaning as they do in the SMTP class.
-    To specify a Unix socket, you must use an absolute
-    path as the host, starting with a '/'.
+    meaning as they do in the SMTP class.  To specify a Unix socket,
+    you must use an absolute path as the host, starting with a '/'.
 
     Authentication is supported, using the regular SMTP mechanism. When
     using a Unix socket, LMTP generally don't support or require any

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


More information about the Python-checkins mailing list