diff options
author | Faidon Liambotis <paravoid@debian.org> | 2024-04-25 15:17:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 15:17:40 (GMT) |
commit | fb7f79b4da35b75cdc82ff3cf20816d2bf93d416 (patch) | |
tree | ae468509ee068193e62ebcbf9df92f019d1377a0 /Python/executor_cases.c.h | |
parent | eb20a7d12c4b2ab7931074843f8602a48b5b07bd (diff) | |
download | cpython-fb7f79b4da35b75cdc82ff3cf20816d2bf93d416.zip cpython-fb7f79b4da35b75cdc82ff3cf20816d2bf93d416.tar.gz cpython-fb7f79b4da35b75cdc82ff3cf20816d2bf93d416.tar.bz2 |
gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)
While properties like IPv6Address.is_private account for IPv4-mapped
IPv6 addresses, such as for example:
>>> ipaddress.ip_address("192.168.0.1").is_private
True
>>> ipaddress.ip_address("::ffff:192.168.0.1").is_private
True
...the same doesn't currently apply to the is_loopback property:
>>> ipaddress.ip_address("127.0.0.1").is_loopback
True
>>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback
False
At minimum, this inconsistency between different properties is
counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and
purposes a loopback address, and should be treated as such.
Diffstat (limited to 'Python/executor_cases.c.h')
0 files changed, 0 insertions, 0 deletions