Skip to content

Commit 53aeb82

Browse files
miss-islingtonmlnrtMatthieu LienartAA-Turner
authored
[3.13] gh-136752: Clarify documentation for IPv{N}Address.is_reserved (GH-136794) (#136828)
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 2d0f169 commit 53aeb82

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
@@ -232,7 +232,16 @@ write code that handles both IP versions correctly. Address objects are
232232

233233
.. attribute:: is_reserved
234234

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

237246
.. attribute:: is_loopback
238247

@@ -253,6 +262,7 @@ write code that handles both IP versions correctly. Address objects are
253262

254263
.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
255264
.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
265+
.. _iana-ipv6-address-space: https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
256266

257267
.. method:: IPv4Address.__format__(fmt)
258268

0 commit comments

Comments
 (0)