test.test_ssl.ThreadedTests.test_tls1_3 fails in 2.7 with AttributeError: __exit__ When building python 2.7, update to 20180926 from the 2.7 branch, on Ubuntu 18.10 (cosmic) with OpenSSL 1.1.1 the test_ssl errors out like so: ====================================================================== ERROR: test_tls1_3 (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_ssl.py", line 2815, in test_tls1_3 with context.wrap_socket(socket.socket()) as s: AttributeError: __exit__ Distribution issue https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1759172