]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572) (#149361)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 4 May 2026 13:10:17 +0000 (15:10 +0200)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 13:10:17 +0000 (13:10 +0000)
gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572)

Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes GH-87245.
(cherry picked from commit 7aedd0a6c6ae3b5cdd601e84411e41c56f8d00b9)

Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
Doc/library/ipaddress.rst

index ed5fffa42bc815315d5c5f9ae5681d42ed7cd63b..e00e1b2cea446a5350b44450189e42d5bb3dd8c6 100644 (file)
@@ -361,9 +361,9 @@ write code that handles both IP versions correctly.  Address objects are
 
    .. attribute:: ipv4_mapped
 
-      For addresses that appear to be IPv4 mapped addresses (starting with
-      ``::FFFF/96``), this property will report the embedded IPv4 address.
-      For any other address, this property will be ``None``.
+      For addresses that appear to be IPv4 mapped addresses in the range
+      ``::FFFF:0:0/96`` as defined by :RFC:`4291`, this property reports the
+      embedded IPv4 address. For any other address, this property will be ``None``.
 
    .. attribute:: scope_id