summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Stasiak <jakub@stasiak.at>2020-07-03 16:33:31 +0200
committerJakub Stasiak <jakub@stasiak.at>2020-07-03 16:38:35 +0200
commitbf552350fd8c33b61187efae3c7e3356935b682d (patch)
tree93183f9ed99a6cef7fd87496ee8114f0aa8990ae
parent67f1992e73dffdca15c2fd299d87923d27dd3b0f (diff)
downloadnetaddr-bf552350fd8c33b61187efae3c7e3356935b682d.tar.gz
Add a few backwards compatibility warnings
-rw-r--r--netaddr/ip/__init__.py23
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([])