diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-06-11 15:18:08 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-06-11 15:18:08 (GMT) |
commit | 554bcbf1b925399ef06dd9fd6b87a20f5d028c1e (patch) | |
tree | fa7bc0ec474895b0051422d855065960eb68c3ca /Doc/whatsnew | |
parent | 38ee9afb34d8eb3fc7d080c447f245ab8369934d (diff) | |
download | cpython-554bcbf1b925399ef06dd9fd6b87a20f5d028c1e.zip cpython-554bcbf1b925399ef06dd9fd6b87a20f5d028c1e.tar.gz cpython-554bcbf1b925399ef06dd9fd6b87a20f5d028c1e.tar.bz2 |
#19662: add decode_data to smtpd so you can get at DATA in bytes form.
Otherwise smtpd is restricted to 7bit clean data, since even if the
incoming data is actually utf-8, it will often break things to decode
it before parsing the message.
Patch by Maciej Szulik, with some adjustments (mostly the warning
support).
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.5.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index af734c8..68106c1 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -184,6 +184,16 @@ signal debugging, instead of integer “magic numbers”. (contributed by Giampaolo Rodola' in :issue:`21076`) +smtpd +----- + +* Both :class:`~smtpd.SMTPServer` and :class:`smtpd.SMTPChannel` now accept a + *decode_data* keyword to determine if the DATA portion of the SMTP + transaction is decoded using the ``utf-8`` codec or is instead provided to + :meth:`~smtpd.SMTPServer.process_message` as a byte string. The default + is ``True`` for backward compatibility reasons, but will change to ``False`` + in Python 3.6. (Contributed by Maciej Szulik in :issue:`19662`.) + socket ------ @@ -245,6 +255,12 @@ Deprecated Python modules, functions and methods * The :mod:`formatter` module has now graduated to full deprecation and is still slated for removal in Python 3.6. +* :mod:`smtpd` has in the past always decoded the DATA portion of email + messages using the ``utf-8`` codec. This can now be controlled by the new + *decode_data* keyword to :class:`~smtpd.SMTPServer`. The default value is + ``True``, but this default is deprecated. Specify the *decode_data* keyword + with an appropriate value to avoid the deprecation warning. + Deprecated functions and types of the C API ------------------------------------------- |