[New-bugs-announce] [issue27628] ipaddress incompatibility with ipaddr: __contains__ between networks

Łukasz Langa report at bugs.python.org
Tue Jul 26 13:34:35 EDT 2016


New submission from Łukasz Langa:

ipaddr historically let users compare if one network is within another network:
https://github.com/google/ipaddr-py/blob/master/ipaddr.py#L643

ipaddress specifically prohibits this comparison:
https://hg.python.org/cpython/file/tip/Lib/ipaddress.py#l675

What is the reason behind this change? I propose we restore this functionality for 3.6. It's a behavior change but arguably backwards compatible in the sense that between 3.3 and 3.5 this __contains__ comparison always returns False. It's also more on par with what ipaddr did in the past. Thoughts?

----------
assignee: pmoody
components: Library (Lib)
messages: 271399
nosy: berker.peksag, lukasz.langa, ncoghlan, pmoody
priority: normal
severity: normal
stage: needs patch
status: open
title: ipaddress incompatibility with ipaddr: __contains__ between networks
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27628>
_______________________________________


More information about the New-bugs-announce mailing list