| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…l exceptions
IANA's IPv6 Special-Purpose Address Registry (2024-04) lists 2001:1::3/128
("DNS-SD Service Registration Protocol Anycast", RFC 9665) as globally
reachable, like 2001:1::1/128 and 2001:1::2/128. It was missing from
_IPv6Constants._private_networks_exceptions, so is_global returned False
for it. Add the exception and extend testReservedIpv6.
There was a problem hiding this comment.
LGTM.
ipaddress _private_networks table refers to https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml which contains 2001:1::3/128: allocated in 2024-04 and refer to RFC 9665.
Sorry, something went wrong.
|
Gentle ping — this has been approved (thanks @vstinner) and has carried the awaiting merge label since Jun 8. Anything else needed from my side before it can land? Happy to rebase if it has gone stale. |
Sorry, something went wrong.
|
@serhiy-storchaka: Would you mind reviewing this fix? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
IANA's IPv6 Special-Purpose Address Registry (2024-04) lists 2001:1::3/128
("DNS-SD Service Registration Protocol Anycast", RFC 9665) with
Globally Reachable = True, like its neighbours 2001:1::1/128 (PCP, RFC 7723)
and 2001:1::2/128 (TURN, RFC 8155).
_IPv6Constants._private_networks_exceptions carved out ::1 and ::2
(added in GH-113179 for #113171) but never got ::3, so
ipaddress.ip_address('2001:1::3').is_global wrongly returns False.
This PR adds IPv6Network('2001:1::3/128') to the exceptions list, with an
RFC 9665 reference comment, and extends testReservedIpv6 to assert
2001:1::3 is global / not private and that the adjacent unregistered
2001:1::4 stays non-global (so the carve-out is exact). Adds a Misc/NEWS entry.
I cross-checked the whole IANA IPv6 registry against the exceptions list: every
other Globally-Reachable entry that sits inside a non-global parent block --
2001:1::1, 2001:1::2, 2001:3::/32, 2001:4:112::/48, 2001:20::/28,
2001:30::/28, all under 2001::/23 -- is already present, so 2001:1::3 is
the only one missing. The two Globally-Reachable blocks that are not inside a
private parent (64:ff9b::/96, 2620:4f:8000::/48) need no exception. The
exceptions list (and the ::1/::2 siblings) landed in GH-113179 and first
shipped in 3.13, so this applies to 3.13+.
Before:
>>> ipaddress.ip_address('2001:1::3').is_global FalseAfter:
AI Usage Statement
This contribution was made by the human contributor, who identified the issue
(the IANA 2024-04 2001:1::3/128 / RFC 9665 registration missing from CPython's
IPv6 exceptions table), reproduced it, designed the one-line fix to mirror the
existing ::1/::2 entries, wrote the test and the NEWS entry, and reviewed
and verified everything. An AI assistant helped with locating the relevant code,
cross-checking the IANA registry, and drafting text. Per the CPython policy that
disclosing AI assistance is appreciated, this is disclosed here.