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 moritzs
Recipients moritzs
Date 2016-08-25.15:14:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za>
In-reply-to
Content
This patch fixes the following minor issues with the ipaddress module:

- Removed unused property _BaseV4._valid_mask_octets
- Removed unused methods _BaseV4._is_valid_netmask() and _BaseV4._is_hostmask()
- Replaced several calls to superclass constructors by super()

It also refactors the constructors of IPv4Network, IPv4Interface, IPv6Network, and IPv6Interface.
They all now use the new method _get_addr_prefix_tuple() to parse the argument. It now matches the following sentence of the documentation of IPv4/6Interface:
"The meaning of address is as in the constructor of IPv4Network".

Additionally they now also accept a bytes or an IPv4/6Address object representing a netmask (or a hostmask [only IPv4]) as second element of an address/netmask tuple. This makes it easier to work with C-APIs that provide netmasks only as bytes object.

This patch does not try to solve issue 27683.
History
Date User Action Args
2016-08-25 15:14:29moritzssetrecipients: + moritzs
2016-08-25 15:14:28moritzssetmessageid: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za>
2016-08-25 15:14:28moritzslinkissue27860 messages
2016-08-25 15:14:28moritzscreate