[all] Upcoming incompatible changes in netaddr 1.0.x
Hello, While looking into some test failures in an attempt to bump netaddr from 0.10.x to 1.0.x[1], we learned that there are a few changes in netaddr 10.0.x impacting our current usage. I'll attempt to summarize a few important ones in this email, and would like to ask each team to look into your project to assess the impacts caused by these changes. 1. INET_PTON (more restrictive check by default) is used by default In 1.0.1, all features dependent on ip address parsing uses INET_PTON by default instead of INET_ATON. With this change a few "strange" address values such as '192.0' or even '1' is no longer accepted. In case you want to restore the previous behavior then you have to add flags=netaddr.core.INET_ATON to each call. See [2] for example. This is caught in neutron unit tests[4] but my need to be further check in libraries handling IP addresses. 2. valid_ipvN raises exception for non-string value. Previously netaddr.valid_ipv(4|6) returned False for non-string values such as None. This was (unintentionally) changed in 1.0.x. I proposed restoring the old behavior but the maintainer preferred strictness about the input type, and we eventually agreed on throwing more explicit exception (TypeError). At this moment this affects only manila unit tests which I'm fixing by [5], but I wonder if there is any specific use case in any project dependent on the previous behavior. If so then probably we can add our own logic to handle non-string value, for example in oslo_utils.netutils. 3. A few deprecated interfaces are removed. At this moment I'm aware of only impact on heat (caused by implicit_prefix removed), but double-check my be better. Thank you, Takashi [1] https://review.opendev.org/c/openstack/requirements/+/909300 [2] https://review.opendev.org/c/openstack/oslo.utils/+/909307 [3] https://github.com/netaddr/netaddr/issues/368 [4] https://bugs.launchpad.net/neutron/+bug/2054203 [5] https://review.opendev.org/c/openstack/manila/+/909298 -- Takashi Kajinami irc: tkajinam github: https://github.com/kajinamit launchpad: https://launchpad.net/~kajinamit
participants (1)
-
Takashi Kajinami