Created attachment 249307 [details] py-netaddr-1.2.1.patch Hi Moin, attached is a patch that updates net/py-netaddr to 1.2.1. Changes to the port: ~~~~~~~~~~~~~~~~~~~~ - Switch to the PEP517 build framework. QA: ~~~ - poudriere -> OK (13.2-RELEASE amd64 py38, py39, py310, py311) Results of "make test" (for py38, py39, py310, py311): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ==== 339 passed, 1 skipped in N.NNs ====
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=58df5a82adc4a80fd73bfcb61a7be8377ba01aff commit 58df5a82adc4a80fd73bfcb61a7be8377ba01aff Author: Kai Knoblich <kai@FreeBSD.org> AuthorDate: 2024-03-27 05:34:29 +0000 Commit: Kai Knoblich <kai@FreeBSD.org> CommitDate: 2024-03-27 05:34:29 +0000 net/py-netaddr: Update to 1.2.1 * Switch to the PEP517 build framework. Changelog since 0.10.1: https://github.com/netaddr/netaddr/blob/1.2.1/CHANGELOG.rst PR: 277810 Approved by: bofh (maintainer, implicit) net/py-netaddr/Makefile | 9 ++++++--- net/py-netaddr/distinfo | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-)
Comment on attachment 249307 [details] py-netaddr-1.2.1.patch ^Triage: Set maintainer-approval flag to '+' as implicit approval for less affecting py-* ports was given after private discussion.
Keep this bug open for a few more days for reference.
No reported problems, so this bug is now closed.
Sorry to come one month later, but I just hit a problem with net-im/py-matrix-synapse: the service fails to start after upgrading py-netaddr from 0.10.1 to 1.2.1. Rolling back to the old version solves it. I cannot be very informative at this moment, but here is the error output: --- Starting synapse. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/netaddr/strategy/ipv6.py", line 170, in int_to_str addr = _inet_ntop(AF_INET6, packed_int) File "/usr/local/lib/python3.9/site-packages/netaddr/fbsocket.py", line 98, in inet_ntop ipv4_str = inet_ntoa(packed_ipv4) File "/usr/local/lib/python3.9/site-packages/netaddr/fbsocket.py", line 20, in inet_ntoa raise TypeError('string type expected, not %s' % type(packed_ip)) TypeError: string type expected, not <class 'bytes'> --- Thus it sounds to be related to some check or config around IPv6 (which has always been disabled on that machine). This just to notify, in case someone else would experience similar issue. I'll provide some further info ASAP.
(In reply to Andrew from comment #5) Hi Andrew, thanks for the report. Based on your information, it looks very much like the issue #16996 (see the "See also" section) reported at the upstream repository of net-im/py-matrix-synapse. The problem described there could be solved by building Python with IPv6 support enabled, even if no IPv6 address is used. The support for IPv6 is enabled by default in the FreeBSD ports tree and based on your information, I assume that you are using an IPv4 only system. To rule a few things out in the further diagnosis: Are you using a custom configured lang/python39 port with disabled IPv6 support (= option IPV6 unset)?
(In reply to Kai Knoblich from comment #6) Thank you so much Kai! In fact I have custom built Python without IPv6 support. Rebuilding with it solves the problem. I do not know if this behavior in such a scenario, or if we should notify it upstream... I found this [1], but I do not know if it might be related. Just to be sue it's not something I missed on my side: I simply didn't set any IPv6 address on my FreeBSD 13.3 machine. This is enough to say that I have an IPv4-only system, or should I have explicitly disabled IPv6 on the host by setting any sysctl or kenv variables (or anything else, such as recompiling the kernel without INET6 option)? [1] https://github.com/netaddr/netaddr/issues/381