]> granicus.if.org Git - python/commit
[3.5] 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:55 +0000 (17:16 +0300)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2017 14:16:55 +0000 (17:16 +0300)
commitc5a6fb654a280c7b17f1d348e2e40d62ca04c5d3
tree968e2057ace876fc7730e3c19849fa3036235a57
parentb39c78a73c203dcaf8f2061da81827c667440402
[3.5] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH-879) (#2218)

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