diff options
author | Коренберг Марк <socketpair@gmail.com> | 2018-02-12 19:47:42 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-02-12 19:47:42 (GMT) |
commit | 7766b96ab80b04509bbac708ee5ecf3c1c5934fc (patch) | |
tree | fd14d59599e60bbc67dc723ce0d2b9a0eda2e66d /Doc/library/socket.rst | |
parent | 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7 (diff) | |
download | cpython-7766b96ab80b04509bbac708ee5ecf3c1c5934fc.zip cpython-7766b96ab80b04509bbac708ee5ecf3c1c5934fc.tar.gz cpython-7766b96ab80b04509bbac708ee5ecf3c1c5934fc.tar.bz2 |
bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (#5449)
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r-- | Doc/library/socket.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 7f0d4ed..04042ff 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -77,6 +77,11 @@ created. Socket addresses are represented as follows: backward compatibility. Note, however, omission of *scopeid* can cause problems in manipulating scoped IPv6 addresses. + .. versionchanged:: 3.7 + For multicast addresses (with *scopeid* meaningful) *address* may not contain + ``%scope`` (or ``zone id``) part. This information is superfluous and may + be safely omitted (recommended). + - :const:`AF_NETLINK` sockets are represented as pairs ``(pid, groups)``. - Linux-only support for TIPC is available using the :const:`AF_TIPC` @@ -635,6 +640,10 @@ The :mod:`socket` module also offers various network-related services: .. versionchanged:: 3.2 parameters can now be passed using keyword arguments. + .. versionchanged:: 3.7 + for IPv6 multicast addresses, string representing an address will not + contain ``%scope`` part. + .. function:: getfqdn([name]) Return a fully qualified domain name for *name*. If *name* is omitted or empty, @@ -693,6 +702,8 @@ The :mod:`socket` module also offers various network-related services: or numeric address representation in *host*. Similarly, *port* can contain a string port name or a numeric port number. + For IPv6 addresses, ``%scope`` is appended to the host part if *sockaddr* + contains meaningful *scopeid*. Usually this happens for multicast addresses. .. function:: getprotobyname(protocolname) @@ -1193,6 +1204,10 @@ to sockets. an exception, the method now retries the system call instead of raising an :exc:`InterruptedError` exception (see :pep:`475` for the rationale). + .. versionchanged:: 3.7 + For multicast IPv6 address, first item of *address* does not contain + ``%scope`` part anymore. In order to get full IPv6 address use + :func:`getnameinfo`. .. method:: socket.recvmsg(bufsize[, ancbufsize[, flags]]) |