cpython/Doc/tools
Petr Viktorin 22adf29da8
[3.9] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (GH-118472)
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).

This patch updates the ranges with what was missing or otherwise
incorrect.

100.64.0.0/10 is left alone, for now, as it's been made special in [1].

The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.

[1] https://github.com/python/cpython/issues/61602

In 3.10 and below, is_private checks whether the network and broadcast
address are both private.
In later versions (where the test wss backported from), it checks
whether they both are in the same private network.

For 0.0.0.0/0, both 0.0.0.0 and 255.225.255.255 are private,
but one is in 0.0.0.0/8 ("This network") and the other in
255.255.255.255/32 ("Limited broadcast").

---------

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2024-05-07 11:57:58 +02:00
..
extensions [3.9] gh-92448: Update the documentation builder to render the GitHub issue. (GH-92449). (GH-92458) 2022-05-08 22:21:05 +09:00
static bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30343) 2022-01-02 18:04:33 -05:00
templates bpo-41028: Doc: Move switchers to docsbuild-scripts. (GH-20969) (GH-30343) 2022-01-02 18:04:33 -05:00
rstlint.py bpo-11233: Create availability directive for documentation (GH-9692) 2018-10-12 16:55:20 +02:00
susp-ignored.csv [3.9] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177) (GH-118472) 2024-05-07 11:57:58 +02:00