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
{{ message }}
Repository navigation
ssl docs: custom client socket example never connects #161763
The custom-context client example wraps a new socket and immediately prints ssock.version(). It never calls connect(), so version() returns None and no TLS connection is made.
The SSLContext.wrap_socket() description also says that "context construction" is deferred for an unconnected client socket. The context already exists; CPython creates the underlying SSL object when SSLSocket.connect() is called. The example should connect before printing the negotiated version, and the description should name the deferred operation.
Activity
notatallshaw commentedon Nov 10, 2026
This came up reviewing an error that can happen in truststore: sethmlarson/truststore#271
pythongh-161763: Qualify SSL socket method references
gh-161763: Correct SSL docs for unconnected client sockets (#GH-61772)
[3.15] gh-161763: Correct SSL docs for unconnected client sockets (#G…
[3.14] gh-161763: Correct SSL docs for unconnected client sockets (#G…
pythongh-161763: Correct SSL docs for unconnected client sockets (#py…