@@ -66,18 +66,17 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
6666 Support for the :keyword: `with ` statement was added.
6767
6868 .. versionchanged :: 3.3
69- source_address argument was added.
69+ * source_address * argument was added.
7070
7171 .. versionadded :: 3.5
7272 The SMTPUTF8 extension (:rfc: `6531 `) is now supported.
7373
7474 .. versionchanged :: 3.9
7575 If the *timeout * parameter is set to be zero, it will raise a
76- :class: `ValueError ` to prevent the creation of a non-blocking socket
76+ :class: `ValueError ` to prevent the creation of a non-blocking socket.
7777
78- .. class :: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
79- certfile=None [, timeout], context=None, \
80- source_address=None)
78+ .. class :: SMTP_SSL(host='', port=0, local_hostname=None, * [, timeout], \
79+ context=None, source_address=None)
8180
8281 An :class: `SMTP_SSL ` instance behaves exactly the same as instances of
8382 :class: `SMTP `. :class: `SMTP_SSL ` should be used for situations where SSL is
@@ -90,15 +89,11 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
9089 aspects of the secure connection. Please read :ref: `ssl-security ` for
9190 best practices.
9291
93- *keyfile * and *certfile * are a legacy alternative to *context *, and can
94- point to a PEM formatted private key and certificate chain file for the
95- SSL connection.
96-
9792 .. versionchanged :: 3.3
9893 *context * was added.
9994
10095 .. versionchanged :: 3.3
101- source_address argument was added.
96+ The * source_address * argument was added.
10297
10398 .. versionchanged :: 3.4
10499 The class now supports hostname check with
@@ -116,13 +111,16 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
116111 If the *timeout * parameter is set to be zero, it will raise a
117112 :class: `ValueError ` to prevent the creation of a non-blocking socket
118113
114+ .. versionchanged :: 3.12
115+ The deprecated *keyfile * and *certfile * parameters have been removed.
116+
119117.. class :: LMTP(host='', port=LMTP_PORT, local_hostname=None, \
120118 source_address=None[, timeout])
121119
122120 The LMTP protocol, which is very similar to ESMTP, is heavily based on the
123121 standard SMTP client. It's common to use Unix sockets for LMTP, so our
124122 :meth: `connect ` method must support that as well as a regular host:port
125- server. The optional arguments local_hostname and source_address have the
123+ server. The optional arguments * local_hostname * and * source_address * have the
126124 same meaning as they do in the :class: `SMTP ` class. To specify a Unix
127125 socket, you must use an absolute path for *host *, starting with a '/'.
128126
@@ -360,7 +358,7 @@ An :class:`SMTP` instance has the following methods:
360358 be used as argument to the ``AUTH `` command; the valid values are
361359 those listed in the ``auth `` element of :attr: `esmtp_features `.
362360
363- *authobject * must be a callable object taking an optional single argument:
361+ *authobject * must be a callable object taking an optional single argument::
364362
365363 data = authobject(challenge=None)
366364
@@ -393,7 +391,7 @@ An :class:`SMTP` instance has the following methods:
393391 .. versionadded :: 3.5
394392
395393
396- .. method :: SMTP.starttls(keyfile=None, certfile=None , context=None)
394+ .. method :: SMTP.starttls(* , context=None)
397395
398396 Put the SMTP connection in TLS (Transport Layer Security) mode. All SMTP
399397 commands that follow will be encrypted. You should then call :meth: `ehlo `
@@ -416,6 +414,9 @@ An :class:`SMTP` instance has the following methods:
416414 :func: `ssl.create_default_context ` select the system's trusted CA
417415 certificates for you.
418416
417+ .. versionchanged :: 3.12
418+ The deprecated *keyfile * and *certfile * parameters have been removed.
419+
419420 :exc: `SMTPHeloError `
420421 The server didn't reply properly to the ``HELO `` greeting.
421422
0 commit comments