This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2016-03-23.00:47:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1458694066.07.0.537208093993.issue26612@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch modifies Lib/test/test_ssl.py to use "with socket:" instead of "try: ... finally: socket.close()" or similar patterns.

Our PPC64 AIX 3.x buildbot has a broken ssl module. A lot of tests logs ResourceWarning on unclosed sockets, because errors occur before the test closes a socket.

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/4714/steps/test/logs/stdio

test_connect_ex_error (test.test_ssl.NetworkedTests) ... ok
test_connect_with_context (test.test_ssl.NetworkedTests) ... FAIL
/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py:628: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('140.211.15.154', 60379), raddr=('23.253.148.168', 443)>
  outcome.errors.clear()
History
Date User Action Args
2016-03-23 00:47:47vstinnersetrecipients: + vstinner
2016-03-23 00:47:46vstinnersetmessageid: <1458694066.07.0.537208093993.issue26612@psf.upfronthosting.co.za>
2016-03-23 00:47:46vstinnerlinkissue26612 messages
2016-03-23 00:47:45vstinnercreate