diff options
author | Jakub Stasiak <jakub@stasiak.at> | 2020-07-03 16:33:31 +0200 |
---|---|---|
committer | Jakub Stasiak <jakub@stasiak.at> | 2020-07-03 16:38:35 +0200 |
commit | bf552350fd8c33b61187efae3c7e3356935b682d (patch) | |
tree | 93183f9ed99a6cef7fd87496ee8114f0aa8990ae | |
parent | 67f1992e73dffdca15c2fd299d87923d27dd3b0f (diff) | |
download | netaddr-bf552350fd8c33b61187efae3c7e3356935b682d.tar.gz |
Add a few backwards compatibility warnings
-rw-r--r-- | netaddr/ip/__init__.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py index b57ef5f..d1232eb 100644 --- a/netaddr/ip/__init__.py +++ b/netaddr/ip/__init__.py @@ -878,6 +878,13 @@ class IPNetwork(BaseIP, IPListMixin): x.x.0.0/y -> 192.168.0.0/16 x.x.x.0/y -> 192.168.0.0/24 + .. warning:: + + The next release (0.9.0) will contain a backwards incompatible change + connected to handling of RFC 6164 IPv6 addresses (/127 and /128 subnets). + When iterating ``IPNetwork`` and ``IPNetwork.iter_hosts()`` the first + addresses in the networks will no longer be excluded and ``broadcast`` + will be ``None``. """ __slots__ = ('_prefixlen',) @@ -1003,7 +1010,14 @@ class IPNetwork(BaseIP, IPListMixin): @property def broadcast(self): - """The broadcast address of this `IPNetwork` object""" + """The broadcast address of this `IPNetwork` object. + + .. warning:: + + The next release (0.9.0) will contain a backwards incompatible change + connected to handling of RFC 6164 IPv6 addresses (/127 and /128 subnets). + ``broadcast`` will be ``None`` when dealing with those networks. + """ if self._module.version == 4 and (self._module.width - self._prefixlen) <= 1: return None else: @@ -1313,6 +1327,13 @@ class IPNetwork(BaseIP, IPListMixin): - for IPv6, only the unspecified address '::' or Subnet-Router anycast \ address (first address in the network) is excluded. + .. warning:: + + The next release (0.9.0) will contain a backwards incompatible change + connected to handling of RFC 6164 IPv6 addresses (/127 and /128 subnets). + When iterating ``IPNetwork`` and ``IPNetwork.iter_hosts()`` the first + addresses in the networks will no longer be excluded. + :return: an IPAddress iterator """ it_hosts = iter([]) |