You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
» ./python.exe -m test test_ssl -m test_preauth_data_to_tls_client
0:00:00 load avg: 1.42 Run 1 test sequentially
0:00:00 load avg: 1.42 [1/1] test_ssl
/Users/sobolev/Desktop/cpython/Lib/test/test_ssl.py:4862: ResourceWarning: unclosed <ssl.SSLSocket fd=8, family=2, type=1, proto=0, laddr=('127.0.0.1', 55685)>
wrap_error = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
== Tests result: SUCCESS ==
1 test OK.
Total duration: 137 ms
Total tests: run=1 (filtered) skipped=1
Total test files: run=1/1 (filtered)
Result: SUCCESS
Two:
» ./python.exe -m test test_ssl -m test_preauth_data_to_tls_server
0:00:00 load avg: 1.53 Run 1 test sequentially
0:00:00 load avg: 1.53 [1/1] test_ssl
/Users/sobolev/Desktop/cpython/Lib/test/test_ssl.py:4801: ResourceWarning: unclosed <ssl.SSLSocket fd=9, family=2, type=1, proto=0, laddr=('127.0.0.1', 55718)>
wrap_error = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
== Tests result: SUCCESS ==
1 test OK.
Total duration: 121 ms
Total tests: run=1 (filtered) skipped=1
Total test files: run=1/1 (filtered)
Result: SUCCESS
Three:
» ./python.exe -m test test_ssl -m test_https_client_non_tls_response_ignored
0:00:00 load avg: 1.65 Run 1 test sequentially
0:00:00 load avg: 1.65 [1/1] test_ssl
/Users/sobolev/Desktop/cpython/Lib/traceback.py:244: ResourceWarning: unclosed <ssl.SSLSocket fd=8, family=2, type=1, proto=0, laddr=('127.0.0.1', 56190)>
tb.tb_frame.clear()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
== Tests result: SUCCESS ==
1 test OK.
Total duration: 80 ms
Total tests: run=1 (filtered)
Total test files: run=1/1 (filtered)
Result: SUCCESS
Env:
macos sonoma
main branch
test_ssl: testing with 'OpenSSL 3.1.2 1 Aug 2023' (3, 1, 0, 2, 0)
under Mac ('14.0', ('', '', ''), 'arm64')
HAS_SNI = True
OP_ALL = 0x80000050
OP_NO_TLSv1_1 = 0x10000000
The ResourceWarning from test_https_client_non_tls_response_ignored (the third case here) has a cause in http.client: HTTPConnection.connect() leaves self.sock open when setsockopt(TCP_NODELAY) fails, and on macOS that call raises EINVAL once the peer has reset the connection, which is what that test's server does. Reported with details as gh-157174, fix in #157175. The two preauth cases leak an SSLSocket and look like a different path.
Activity
iamsharduld commentedon Sep 8, 2026
The
ResourceWarningfromtest_https_client_non_tls_response_ignored(the third case here) has a cause inhttp.client:HTTPConnection.connect()leavesself.sockopen whensetsockopt(TCP_NODELAY)fails, and on macOS that call raisesEINVALonce the peer has reset the connection, which is what that test's server does. Reported with details as gh-157174, fix in #157175. The twopreauthcases leak anSSLSocketand look like a different path.