https://github.com/python/cpython/commit/6293d8a1a648a498b7ac899631b74fa25c71c1ac
commit: 6293d8a1a648a498b7ac899631b74fa25c71c1ac
branch: main
author: Matthieu Lienart <[email protected]>
committer: AA-Turner <[email protected]>
date: 2025-07-19T14:43:56Z
summary:
gh-136752: Clarify documentation for ``IPv{N}Address.is_reserved`` (#136794)
Co-authored-by: Matthieu Lienart <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
files:
M Doc/library/ipaddress.rst
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
index e5bdfbb144b65a..9e887d8e65741b 100644
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -240,7 +240,16 @@ write code that handles both IP versions correctly.
Address objects are
.. attribute:: is_reserved
- ``True`` if the address is otherwise IETF reserved.
+ ``True`` if the address is noted as reserved by the IETF.
+ For IPv4, this is only ``240.0.0.0/4``, the ``Reserved`` address block.
+ For IPv6, this is all addresses `allocated <iana-ipv6-address-space_>`__
as
+ ``Reserved by IETF`` for future use.
+
+ .. note:: For IPv4, ``is_reserved`` is not related to the address block
value of the
+ ``Reserved-by-Protocol`` column in iana-ipv4-special-registry_.
+
+ .. caution:: For IPv6, ``fec0::/10`` a former Site-Local scoped address
prefix is
+ currently excluded from that list (see
:attr:`~IPv6Address.is_site_local` & :rfc:`3879`).
.. attribute:: is_loopback
@@ -261,6 +270,7 @@ write code that handles both IP versions correctly.
Address objects are
.. _iana-ipv4-special-registry:
https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
.. _iana-ipv6-special-registry:
https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
+.. _iana-ipv6-address-space:
https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
.. method:: IPv4Address.__format__(fmt)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]