Bug report
Bug description:
While properties like is_private account for IPv4-mapped IPv6 addresses, such as for example:
>>>ipaddress.ip_address("192.168.0.1").is_privateTrue>>>ipaddress.ip_address("::ffff:192.168.0.1").is_privateTrue...the same doesn't currently apply to the is_loopback property:
>>>ipaddress.ip_address("127.0.0.1").is_loopbackTrue>>>ipaddress.ip_address("::ffff:127.0.0.1").is_loopbackFalseAt 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.
For the record, this will now match the behavior of other languages such as Rust, Go and .NET, cf. rust-lang/rust#69772.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
While properties like
is_privateaccount for IPv4-mapped IPv6 addresses, such as for example:...the same doesn't currently apply to the
is_loopbackproperty:At minimum, this inconsistency between different properties is counter-intuitive. Moreover,
::ffff:127.0.0.0/104is for all intents and purposes a loopback address, and should be treated as such.For the record, this will now match the behavior of other languages such as Rust, Go and .NET, cf. rust-lang/rust#69772.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs