bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (GH-5449) (#5641)

(cherry picked from commit 7766b96ab80b04509bbac708ee5ecf3c1c5934fc)

Co-authored-by: Коренберг Марк <socketpair@gmail.com>
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 @@
   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 @@
    .. 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 @@
    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 @@
       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]])