Modern releases of netaddr (older than version 1.0.0) doesn't support same flags in IPAddress and IPNetwork classes:
class netaddr.IPNetwork(addr, version=None, flags=0, *, expand_partial=False) [...] flags – (optional) decides which rules are applied to the interpretation of the addr value. Currently only supports the NOHOST option.
So, build tests fails on test_ip_address with python module netaddr-1.3.0, for example:
=================================== FAILURES =================================== __________________ test_ip_address[10.11.12.13/14-words2-14] ___________________ self = <[AttributeError("'CheckedIPAddress' object has no attribute '_module'") raised in repr()] CheckedIPAddress object at 0x7f839a75c910> addr = '10.11.12.13/14' def __init__(self, addr): if isinstance(addr, UnsafeIPAddress): self._net = addr._net super(UnsafeIPAddress, self).__init__(addr, flags=self.netaddr_ip_flags) return elif isinstance(addr, netaddr.IPAddress): self._net = None # no information about netmask super(UnsafeIPAddress, self).__init__(addr, flags=self.netaddr_ip_flags) return elif isinstance(addr, netaddr.IPNetwork): self._net = addr super(UnsafeIPAddress, self).__init__(self._net.ip, flags=self.netaddr_ip_flags) return # option of last resort: parse it as string self._net = None addr = str(addr) try: try: > addr = netaddr.IPAddress(addr, flags=self.netaddr_ip_flags) ../ipapython/ipautil.py:110: ... FAILED test_ipapython/test_ipautil.py::test_ip_address[10.11.12.13/14-words2-14] FAILED test_ipapython/test_ipautil.py::test_ip_address[10.11.12.0/24-words10-24] FAILED test_ipapython/test_ipautil.py::test_ip_address[10.11.12.255/24-words13-24] FAILED test_ipapython/test_ipautil.py::test_ip_address[2001::1/72-words17-72] FAILED test_ipapython/test_ipautil.py::test_ip_address[2001::/64-words25-64] ====== 5 failed, 653 passed, 269 skipped, 1 xfailed, 54 warnings in 8.03s ======
Submitted https://github.com/freeipa/freeipa/pull/7482
Metadata Update from @frenaud: - Issue assigned to frenaud
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7535
master:
ipa-4-12:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-59659
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-59659, https://issues.redhat.com/browse/RHEL-67414 (was: https://issues.redhat.com/browse/RHEL-59659)