From: R David Murray Date: Sat, 16 May 2015 18:16:33 +0000 (-0400) Subject: #19662: Make requirement to support arbitrary keywords explicit. X-Git-Tag: v3.5.0b1~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=311376588388647477db55092b61c1c61ecd3f85;p=thirdparty%2FPython%2Fcpython.git #19662: Make requirement to support arbitrary keywords explicit. When not using decode_data=True, smtpd may provide keyword arguments to the process_message user-implemented method. This doc update is intended to make it clear that arbitrary keywords must be supported, so that we can add additional features in the future by just adding keywords to the process_message call. --- diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index 575dcec99462..2682ee0c5730 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -89,6 +89,10 @@ SMTPServer Objects Currently no ``RCPT TO`` options are supported, so for now this will always be an empty list. + Implementations of ``process_message`` should use the ``**kwargs`` + signature to accept arbitrary keword arguments, since future feature + enhancements may add keys to the kwargs dictionary. + Return ``None`` to request a normal ``250 Ok`` response; otherwise return the desired response string in :RFC:`5321` format.