diff options
| author | Tim Graham <timograham@gmail.com> | 2015-05-18 09:23:06 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-05-18 09:48:25 -0400 |
| commit | 7d97c5745e420e3edc22965a2c68c8c9d2eab374 (patch) | |
| tree | 8c7e2c92e5cf86833d31b21972f21bee2612d1fd | |
| parent | f5da4380723c93998a4f5a845b6f26fa51a2cfe1 (diff) | |
Refs #23763 -- Fixed SMTPServer Python 3.5 deprecation warning in mail test.
| -rw-r--r-- | tests/mail/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py index 75d5dd619b..03dfae7903 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -868,6 +868,9 @@ class FakeSMTPServer(smtpd.SMTPServer, threading.Thread): def __init__(self, *args, **kwargs): threading.Thread.__init__(self) + # New kwarg added in Python 3.5; default switching to False in 3.6. + if sys.version_info >= (3, 5): + kwargs['decode_data'] = True smtpd.SMTPServer.__init__(self, *args, **kwargs) self._sink = [] self.active = False |
