diff options
| author | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 01:03:25 +1000 |
|---|---|---|
| committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 01:03:25 +1000 |
| commit | 595f6c36e491fc447bbc082d7a74050fdaa66931 (patch) | |
| tree | cd047e5976f705a14030fff9fe89096d58a40856 /Lib/ipaddress.py | |
| parent | 0decc417d6b68ba49b44d2be0e097f0dd2fd2a07 (diff) | |
| download | cpython-595f6c36e491fc447bbc082d7a74050fdaa66931.tar.gz | |
Issue #14814: Clean out an obsolete property and method from ipaddress Network objects
Diffstat (limited to 'Lib/ipaddress.py')
| -rw-r--r-- | Lib/ipaddress.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py index 1d72bbc91c..cb35685925 100644 --- a/Lib/ipaddress.py +++ b/Lib/ipaddress.py @@ -710,12 +710,6 @@ class _BaseNetwork(_IPAddressBase): return x @property - def network(self): - # XXX (ncoghlan): This is redundant now and will likely be removed - return self.__class__('%s/%d' % (str(self.network_address), - self.prefixlen)) - - @property def with_prefixlen(self): return '%s/%d' % (str(self.ip), self._prefixlen) @@ -942,12 +936,6 @@ class _BaseNetwork(_IPAddressBase): yield current - def masked(self): - """Return the network object with the host bits masked out.""" - # XXX (ncoghlan): This is redundant now and will likely be removed - return self.__class__('%s/%d' % (self.network_address, - self._prefixlen)) - def supernet(self, prefixlen_diff=1, new_prefix=None): """The supernet containing the current network. @@ -1908,7 +1896,7 @@ class _BaseV6(object): """ if isinstance(self, IPv6Network): - return int(self.network) == 1 and getattr( + return int(self) == 1 and getattr( self, '_prefixlen', 128) == 128 elif isinstance(self, IPv6Interface): return int(self.network.network_address) == 1 and getattr( |
