summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/smtplib.rst5
-rw-r--r--Doc/whatsnew/3.5.rst9
2 files changed, 12 insertions, 2 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index 74de77b..2805a93 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -189,8 +189,9 @@ An :class:`SMTP` instance has the following methods:
.. method:: SMTP.set_debuglevel(level)
- Set the debug output level. A true value for *level* results in debug messages
- for connection and for all messages sent to and received from the server.
+ Set the debug output level. A value of 1 or ``True`` for *level* results in debug
+ messages for connection and for all messages sent to and received from the server.
+ A value of 2 for *level* results in these messages being timestamped.
.. method:: SMTP.docmd(cmd, args='')
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index 65119ed..0492ef9 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -468,6 +468,10 @@ smtplib
implement custom authentication mechanisms.
(Contributed by Milan Oberkirch in :issue:`15014`.)
+* Additional debuglevel (2) shows timestamps for debug messages in
+ :class:`smtplib.SMTP`. (Contributed by Gavin Chappell and Maciej Szulik in
+ :issue:`16914`.)
+
sndhdr
------
@@ -819,6 +823,11 @@ Changes in the Python API
* The `pygettext.py` Tool now uses the standard +NNNN format for timezones in
the POT-Creation-Date header.
+* The :mod:`smtplib` module now uses :data:`sys.stderr` instead of previous
+ module level :data:`stderr` variable for debug output. If your (test)
+ program depends on patching the module level variable to capture the debug
+ output, you will need to update it to capture sys.stderr instead.
+
Changes in the C API
--------------------