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.

Author methane
Recipients berker.peksag, methane, moritzs, ncoghlan, pmoody, serhiy.storchaka, xiang.zhang
Date 2019-04-15.10:59:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555325958.14.0.234306980625.issue27860@roundup.psfhosted.org>
In-reply-to
Content
I am not owner of ipaddress module, so I don't know we should
support more form of masks.

On the other hand, IPv4Interface and IPv6Interface expose
netmask and hostmask attributes when address is not bytes or int.

These attributes are not documented.  I assume it was added
accidentally, when coping some code from Network classes.

But there are test for these attributes.
NetmaskTestMixin_v4.test_valid_netmask runs for IPv4Network and IPv4Interface.
It checks these attributes when constructor argument is string.
https://github.com/python/cpython/blob/3c7931e514faf509a39c218c2c9f55efb434628f/Lib/test/test_ipaddress.py#L422-L440

For safety, I added these attributes always, instead of remove them.

PR-12836 is fixing it, and extracts methods for Network/Interface constructor
(a part of PR-12774).  It doesn't add additional mask form support.
History
Date User Action Args
2019-04-15 10:59:18methanesetrecipients: + methane, ncoghlan, pmoody, berker.peksag, serhiy.storchaka, moritzs, xiang.zhang
2019-04-15 10:59:18methanesetmessageid: <1555325958.14.0.234306980625.issue27860@roundup.psfhosted.org>
2019-04-15 10:59:18methanelinkissue27860 messages
2019-04-15 10:59:17methanecreate