[Python-checkins] cpython: #19662: Make requirement to support arbitrary keywords explicit.

r.david.murray python-checkins at python.org
Sat May 16 20:18:21 CEST 2015


https://hg.python.org/cpython/rev/a7d3074fa888
changeset:   96093:a7d3074fa888
user:        R David Murray <rdmurray at bitdance.com>
date:        Sat May 16 14:16:33 2015 -0400
summary:
  #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.

files:
  Doc/library/smtpd.rst |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst
--- a/Doc/library/smtpd.rst
+++ b/Doc/library/smtpd.rst
@@ -89,6 +89,10 @@
              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.
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list