The most relevant change since the last update is the new function socket.create_connect(). It’s an helper function easing the creation of a connected socket to a given address (the usual host+port tuple) with an optional timeout.
The function is currently being used throughout some network related modules in the standard library.
Its implementation is very straightforward:
loop over getaddrinfo's sequences: create the object socket set the timeout if any connect to the remote address return the connected socket if everything went well
At this time it’s being used in ftplib.py, httplib.py, telnetlib.py, poplib.py and smtplib.py.
Thanks to that you can set a timeout directly during the instantiation of these classes: HTTPConnection, FTP, POP3, SMTP and Telnet.
A new kind of temp file in tempfile.py also appeared in the stdlib: SpooledTemporaryFile.
















