From bf552350fd8c33b61187efae3c7e3356935b682d Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Fri, 3 Jul 2020 16:33:31 +0200 Subject: Add a few backwards compatibility warnings --- netaddr/ip/__init__.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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([]) -- cgit v1.2.1