[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

[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 mistake

[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

[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