[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-06-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c5a6fb654a280c7b17f1d348e2e40d62ca04c5d3 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. 
(GH-879) (#2218)
https://github.com/python/cpython/commit/c5a6fb654a280c7b17f1d348e2e40d62ca04c5d3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset cf58dfb44cc11d41ea1473cd7436618b210b8258 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. 
(GH-879) (#2217)
https://github.com/python/cpython/commit/cf58dfb44cc11d41ea1473cd7436618b210b8258


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-06-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2262

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-06-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2261

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-04-14 Thread Berker Peksag

Berker Peksag added the comment:

I think we should backport this to at least 3.6.

--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-04-04 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-04-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: needs patch -> backport needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-04-04 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Serhiy, just checking whether this needs backport? The PR has the backport to 
3.5 and 3.6 labels, but it's not indicated in this ticket.
If it doesn't need backport, then perhaps we can close this issue.
Thanks.

--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-04-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 7bd8d3e794782582a4ad1c9749424fff86802c3e by Serhiy Storchaka 
(s-sanjay) in branch 'master':
bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (#879)
https://github.com/python/cpython/commit/7bd8d3e794782582a4ad1c9749424fff86802c3e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-03-28 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +778

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed, this looks as a bug.

>>> a < b
False
>>> b > a
True

--
nosy: +serhiy.storchaka
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29931] ipaddress.ip_interface __lt__ check seems to be broken

2017-03-28 Thread Sanjay

New submission from Sanjay:

The less than check for ip_interface behavior seems weird. I am not sure if 
this is by design. We are just comparing the network address but when network 
address is equal we should compare the ip address.
The expectation is if a < b is False then b <= a must be True
>>> import ipaddress
>>> a = ipaddress.ip_interface("1.1.1.1/24")
>>> b = ipaddress.ip_interface("1.1.1.2/24")
>>> a < b
False
>>> b <= a
False
>>> a == b
False
>>> 
This happens with both v4 and v6
The tests were passing because in ComparisonTests we were testing with prefix 
length of 32 which means the whole ip address became the network address.
I have made a fix here:
https://github.com/s-sanjay/cpython/commit/14975f58539308b7af5a1519705fb8cd95ad7951
I can add more tests and send PR but before that I wanted to confirm the 
behavior.

--
components: Library (Lib)
messages: 290695
nosy: Sanjay, ncoghlan, pmoody, xiang.zhang
priority: normal
severity: normal
status: open
title: ipaddress.ip_interface __lt__ check seems to be broken
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com