diff options
| author | Tim Graham <timograham@gmail.com> | 2015-05-18 09:23:06 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-10-25 06:02:21 -0400 |
| commit | 95b1ae76ba23367146824188d07bcb0141fed69a (patch) | |
| tree | afc25a25870f67344fd492f0847ba3076ffc2820 /tests | |
| parent | 2a36a9bb15f0f1dee66a52f5fe7e0de57a6bd2e1 (diff) | |
[1.8.x] Refs #23763 -- Fixed SMTPServer Python 3.5 deprecation warning in mail test.
Backport of 7d97c5745e420e3edc22965a2c68c8c9d2eab374 from master
Diffstat (limited to 'tests')
| -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 9df4b519e1..2c92092bf9 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -843,6 +843,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 |
