[issue22941] IPv4Interface arithmetic changes subnet mask
Søren Løvborg
report at bugs.python.org
Thu Feb 5 13:52:51 CET 2015
Søren Løvborg added the comment:
I take it the silence means that the patch is neither obviously good nor obviously bad. :-)
It all comes down to a judgment call: is this a bug, or expected (but undocumented) behavior?
In PEP 387 lingo: Is this a "reasonable bug fix"? Or is it a "design mistake", thus calling for a FutureWarning first, and the actual change later?
>>> ipaddress.IPv4Interface('1.2.3.4/16') + 1
__main__:1: FutureWarning: Arithmetic on IPv4Interface objects will
change in Python 3.6. If you rely on the current behavior, change
'interface + n' to 'IPv4Interface(interface.ip + n, 32)'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22941>
_______________________________________
More information about the Python-bugs-list
mailing list