Issue 34818: test.test_ssl.ThreadedTests.test_tls1_3 fails in 2.7 with AttributeError: exit (original) (raw)

Created on 2018-09-27 09:07 by xnox, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9622 closed python-dev,2018-09-28 13:23
Messages (4)
msg326534 - (view) Author: Dimitri John Ledkov (xnox) * Date: 2018-09-27 09:07
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
msg326599 - (view) Author: Dimitri John Ledkov (xnox) * Date: 2018-09-28 01:14
Similar client sockets are used in that file, but they are wrapped in extra `with closing(...) as s:` Is closing() wrapper missing in this test case?
msg326612 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-09-28 06:58
Yes, that's it. In Python 2.7, socket classes don't implement the context manager protocol.
msg343848 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-05-29 01:17
Thank you for the report and the pull request. This was fixed as part of , so I'm closing this as a duplicate.
History
Date User Action Args
2022-04-11 14:59:06 admin set github: 78999
2019-05-29 01:17:06 cheryl.sabella set status: open -> closedsuperseder: Sane defaults for SSLContext options and ciphersnosy: + cheryl.sabellamessages: + resolution: duplicatestage: patch review -> resolved
2018-10-01 19:40:08 cstratak set nosy: + cstratak
2018-09-28 13:23:34 python-dev set keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest9020>
2018-09-28 06:58:36 christian.heimes set messages: +
2018-09-28 01:14:31 xnox set messages: +
2018-09-27 09:46:07 christian.heimes set priority: normal -> deferred blockertype: behaviorstage: needs patch
2018-09-27 09:36:26 xtreak set nosy: + xtreak
2018-09-27 09:07:11 xnox create