diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2009-10-05 21:25:35 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2009-10-05 21:25:35 (GMT) |
commit | 915b1206f2188e49536745b560e505b9e48e2608 (patch) | |
tree | 120e66ad50ec3b603be69fe049b6de252c4bf95b | |
parent | f6e3d7d585837d3e037d149c2756c5bd43cffbac (diff) | |
download | cpython-915b1206f2188e49536745b560e505b9e48e2608.zip cpython-915b1206f2188e49536745b560e505b9e48e2608.tar.gz cpython-915b1206f2188e49536745b560e505b9e48e2608.tar.bz2 |
Note side benefit of socket.create_connection()
-rw-r--r-- | Doc/whatsnew/2.6.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index a629e5f..2cfd351 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -2412,9 +2412,13 @@ changes, or look through the Subversion logs for all the details. environments. TIPC addresses are 4- or 5-tuples. (Contributed by Alberto Bertogli; :issue:`1646`.) - A new function, :func:`create_connection`, takes an address - and connects to it using an optional timeout value, returning - the connected socket object. + A new function, :func:`create_connection`, takes an address and + connects to it using an optional timeout value, returning the + connected socket object. This function also looks up the address's + type and connects to it using IPv4 or IPv6 as appropriate. Changing + your code to use :func:`create_connection` instead of + ``socket(socket.AF_INET, ...)`` may be all that's required to make + your code work with IPv6. * The base classes in the :mod:`SocketServer` module now support calling a :meth:`handle_timeout` method after a span of inactivity |