Open mgorny opened 5 months ago
Hi, thanks for reporting this!
I'm seeing tests passing for Python 3.12 in Github Actions.
Maybe it's a difference in underlying hardware?
I've been able to reproduce it both in Gentoo packaging process that uses an isolated network namespace with just the loopback interface, and on my regular system.
The ifconfig from the test setup is:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
inet6 fd::1 prefixlen 8 scopeid 0x0<global>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I've got another data point: the test passes with Python 3.12.3 but fails with 3.12.4. FWICS GitHub Actions are stuck on .3 for some reason.
The log for 3.12.4 says:
Fixed is_global and is_private behavior in IPv4Address, IPv6Address, IPv4Network and IPv6Network.
Thanks! I'll have to figure out how to update the tests for this.
This seems to be cause by python/cpython@f86b17ac511e68192ba71f27e752321a3252cee3, particularly:
+ # IANA says N/A, let's consider it not globally reachable to be safe
+ IPv6Network('2002::/16'),
Perhaps the simplest solution would be to avoid this particular range, since it's "undefined" by IANA.
Good call! Thanks for the research.
Hmmm... after looking at this I'm not sure if I can use another range because this test is specifically testing 6to4 addressing which is in this network space. I may just need to do a python version check and allow either value depending on the version.
Ah, right then. According to the documentation, the results changed in 3.12.4 and 3.13.0, so I guess you can just check for >= (3, 12, 4)
.
@kellyjonbrazil I am also seeing this test failure in Debian.
I'm going to try making a pull request.
Thanks for the PR - I'll get that in the next release.
When running the test suite under Python 3.12.4, the following test fails:
It seems to pass with 3.11 and older.
Note I had to add
maxDiff = None
to get a diff there.