Message273655
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. |
|
Date |
User |
Action |
Args |
2016-08-25 15:14:29 | moritzs | set | recipients:
+ moritzs |
2016-08-25 15:14:28 | moritzs | set | messageid: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> |
2016-08-25 15:14:28 | moritzs | link | issue27860 messages |
2016-08-25 15:14:28 | moritzs | create | |
|