Skip to content

Commit f8af7cb

Browse files
miss-islingtonmlnrtMatthieu LienartAA-Turner
authored
[3.14] gh-136752: Clarify documentation for IPv{N}Address.is_reserved (GH-136794) (#136827)
gh-136752: Clarify documentation for ``IPv{N}Address.is_reserved`` (GH-136794) (cherry picked from commit 6293d8a) Co-authored-by: Matthieu Lienart <50069805+mlnrt@users.noreply.github.com> Co-authored-by: Matthieu Lienart <matthieu.lienart@axians.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 8d063f3 commit f8af7cb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Doc/library/ipaddress.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,16 @@ write code that handles both IP versions correctly. Address objects are
240240

241241
.. attribute:: is_reserved
242242

243-
``True`` if the address is otherwise IETF reserved.
243+
``True`` if the address is noted as reserved by the IETF.
244+
For IPv4, this is only ``240.0.0.0/4``, the ``Reserved`` address block.
245+
For IPv6, this is all addresses `allocated <iana-ipv6-address-space_>`__ as
246+
``Reserved by IETF`` for future use.
247+
248+
.. note:: For IPv4, ``is_reserved`` is not related to the address block value of the
249+
``Reserved-by-Protocol`` column in iana-ipv4-special-registry_.
250+
251+
.. caution:: For IPv6, ``fec0::/10`` a former Site-Local scoped address prefix is
252+
currently excluded from that list (see :attr:`~IPv6Address.is_site_local` & :rfc:`3879`).
244253

245254
.. attribute:: is_loopback
246255

@@ -261,6 +270,7 @@ write code that handles both IP versions correctly. Address objects are
261270

262271
.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
263272
.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
273+
.. _iana-ipv6-address-space: https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
264274

265275
.. method:: IPv4Address.__format__(fmt)
266276

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy