]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#19662: Make requirement to support arbitrary keywords explicit.
authorR David Murray <rdmurray@bitdance.com>
Sat, 16 May 2015 18:16:33 +0000 (14:16 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 16 May 2015 18:16:33 +0000 (14:16 -0400)
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.

Doc/library/smtpd.rst

index 575dcec9946211510bbeeffda976ac61f5b2bfb1..2682ee0c57308748e57daff5caea0ae27f0e18c8 100644 (file)
@@ -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.