[issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-29 Thread Søren Løvborg
Søren Løvborg added the comment: As mentioned python-dev, I'm not entirely sold on raising an exception on overflow. To recap the mailing list discussion, there was general agreement that the current behavior is a bug, suggesting that there's no need to go through the depreciation process. Th

[issue22941] IPv4Interface arithmetic changes subnet mask

2015-03-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for trying this! As discussed on python-dev, overflowing the netmask should raise an OverflowError. Also, some tests should be added to Lib/test/test_ipaddress.py. -- nosy: +pitrou stage: -> needs patch versions: +Python 3.5 ___

[issue22941] IPv4Interface arithmetic changes subnet mask

2015-02-05 Thread Søren Løvborg
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 mista

[issue22941] IPv4Interface arithmetic changes subnet mask

2014-11-25 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +ncoghlan, pmoody ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22941] IPv4Interface arithmetic changes subnet mask

2014-11-25 Thread Søren Løvborg
Søren Løvborg added the comment: Proposed implementation patch attached. If this has any interest, I'll look into expanding the patch to include documentation and unit tests. Resulting behavior: >>> import ipaddress >>> ipaddress.IPv4Interface('10.0.0.1/8') + 1 IPv4Interface('10.0.0.2/8') >>> i

[issue22941] IPv4Interface arithmetic changes subnet mask

2014-11-25 Thread Søren Løvborg
New submission from Søren Løvborg: Addition and subtraction of integers are documented for ipaddress.IPv4Address and ipaddress.IPv6Address, but also work for IPv4Interface and IPv6Interface (though the only documentation of this is a brief mention that the Interface classes inherit from the re