Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) #118177

Merged
merged 2 commits into from
Apr 24, 2024

Commits on Apr 23, 2024

  1. pythonGH-65056: Improve the IP address' is_global/is_private document…

    …ation (pythonGH-113186)
    
    * pythonGH-65056: Improve the IP address' is_global/is_private documentation
    
    It wasn't clear what the semantics of is_global/is_private are and, when
    one gets to the bottom of it, it's not quite so simple (hence the
    exceptions listed).
    
    Co-authored-by: Petr Viktorin <encukou@gmail.com>
    jstasiak and encukou committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    12cf493 View commit details
    Browse the repository at this point in the history
  2. [3.12] pythonGH-113171: Fix "private" (non-global) IP address ranges (p…

    …ythonGH-113179)
    
    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.
    
    I left 100.64.0.0/10 alone, for now, as it's been made special in [1]
    and I'm not sure if we want to undo that as I don't quite understand the
    motivation behind it.
    
    The _address_exclude_many() call returns 8 networks for IPv4, 121
    networks for IPv6.
    
    [1] python#61602
    
    (cherry picked from commit 40d75c2)
    jstasiak authored and encukou committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    a74a45b View commit details
    Browse the repository at this point in the history