Skip to content

Commit 641bc6b

Browse files
author
opavliuk
committed
bpo-34788 Unify scope id naming
1 parent ef42a2d commit 641bc6b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Doc/library/ipaddress.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ write code that handles both IP versions correctly. Address objects are
219219
``"::abc:7:def"``.
220220

221221
Optionally, the string may also have a scope zone ID, expressed
222-
with a suffix ``%<scope_id>``. If present, the scope ID must be non-empty,
222+
with a suffix ``%scope_id``. If present, the scope ID must be non-empty,
223223
and may not contain ``%``.
224224
See :RFC:`4007` for details.
225225
For example, ``fe80::1234%1`` might identify address ``fe80::1234`` on the first link of the node.

Doc/library/socket.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ created. Socket addresses are represented as follows:
7878
Python programs.
7979

8080
- For :const:`AF_INET6` address family, a four-tuple ``(host, port, flowinfo,
81-
scopeid)`` is used, where *flowinfo* and *scopeid* represent the ``sin6_flowinfo``
81+
scope_id)`` is used, where *flowinfo* and *scope_id* represent the ``sin6_flowinfo``
8282
and ``sin6_scope_id`` members in :const:`struct sockaddr_in6` in C. For
83-
:mod:`socket` module methods, *flowinfo* and *scopeid* can be omitted just for
84-
backward compatibility. Note, however, omission of *scopeid* can cause problems
83+
:mod:`socket` module methods, *flowinfo* and *scope_id* can be omitted just for
84+
backward compatibility. Note, however, omission of *scope_id* can cause problems
8585
in manipulating scoped IPv6 addresses.
8686

8787
.. versionchanged:: 3.7
88-
For multicast addresses (with *scopeid* meaningful) *address* may not contain
89-
``%scope`` (or ``zone id``) part. This information is superfluous and may
88+
For multicast addresses (with *scope_id* meaningful) *address* may not contain
89+
``%scope_id`` (or ``zone id``) part. This information is superfluous and may
9090
be safely omitted (recommended).
9191

9292
- :const:`AF_NETLINK` sockets are represented as pairs ``(pid, groups)``.
@@ -757,7 +757,7 @@ The :mod:`socket` module also offers various network-related services:
757757

758758
.. versionchanged:: 3.7
759759
for IPv6 multicast addresses, string representing an address will not
760-
contain ``%scope`` part.
760+
contain ``%scope_id`` part.
761761

762762
.. function:: getfqdn([name])
763763

@@ -825,8 +825,8 @@ The :mod:`socket` module also offers various network-related services:
825825
or numeric address representation in *host*. Similarly, *port* can contain a
826826
string port name or a numeric port number.
827827

828-
For IPv6 addresses, ``%scope`` is appended to the host part if *sockaddr*
829-
contains meaningful *scopeid*. Usually this happens for multicast addresses.
828+
For IPv6 addresses, ``%scope_id`` is appended to the host part if *sockaddr*
829+
contains meaningful *scope_id*. Usually this happens for multicast addresses.
830830

831831
For more information about *flags* you can consult :manpage:`getnameinfo(3)`.
832832

@@ -1352,7 +1352,7 @@ to sockets.
13521352

13531353
.. versionchanged:: 3.7
13541354
For multicast IPv6 address, first item of *address* does not contain
1355-
``%scope`` part anymore. In order to get full IPv6 address use
1355+
``%scope_id`` part anymore. In order to get full IPv6 address use
13561356
:func:`getnameinfo`.
13571357

13581358
.. method:: socket.recvmsg(bufsize[, ancbufsize[, flags]])

0 commit comments

Comments
 (0)