]> granicus.if.org Git - python/commit
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 15 Jun 2017 14:16:38 +0000 (17:16 +0300)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2017 14:16:38 +0000 (17:16 +0300)
commitcf58dfb44cc11d41ea1473cd7436618b210b8258
treef603c05144d262cdec6edadc1b44b8bd98db0bfb
parentf75f6edb1fdbaeb12f9de368ebdeb1b7d1836433
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH-879) (#2217)

the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie

add more ip_interface comparison tests.
(cherry picked from commit 7bd8d3e794782582a4ad1c9749424fff86802c3e)
Lib/ipaddress.py
Lib/test/test_ipaddress.py
Misc/NEWS