[issue25852] smtplib's SMTP.connect() should store the server name in ._host for .starttls()

gigaplastik report at bugs.python.org
Fri Sep 9 05:51:43 EDT 2016


gigaplastik added the comment:

Here is the updated (3.6.0a4+) patch for the issue with the unit test included.

My unit test only checks for this issue particular artifacts, it does not test that .starttls actually works. This is because the current test suite for smtplib (Lib/test/test_smtplib.py) does not implement SSL/TLS functionality neither in its "debugging server", nor in its "simulated server" and implementing it on my own is beyond my expertise. Nevertheless, the provided unit test does guarantee .starttls wouldn't break because of the empty ._host attribute.
The overall Python test suite also runs successfully with these patches applied.

----------
Added file: http://bugs.python.org/file44495/issue25852_v3_with tests.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25852>
_______________________________________


More information about the Python-bugs-list mailing list