This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ip_interface addition and subtraction changes netmask
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: pmoody, wyko.ter.haar
Priority: normal Keywords:

Created on 2020-11-26 23:14 by wyko.ter.haar, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg381918 - (view) Author: Wyko ter Haar (wyko.ter.haar) Date: 2020-11-26 23:14
When increasing IPv4Interface('10.0.0.0/29)'  by 1, I would expect to get IPv4Interface('10.0.0.1/29') . Unfortunately, it seems to change the netmask on it as well. That seems really unintuitive to me.

For example:
>>> ip_interface('10.0.0.0/24')
IPv4Interface('10.0.0.0/24')
>>>
>>> ip_interface('10.0.0.0/24')+1
IPv4Interface('10.0.0.1/32')
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86643
2020-11-28 20:04:31epainesetnosy: + pmoody

components: + Library (Lib)
versions: + Python 3.10, - Python 3.9
2020-11-26 23:14:01wyko.ter.haarcreate