GH-65056: Improve the IP address' is_global/is_private documentation by jstasiak · Pull Request #113186 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation10 Commits6 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Contributor
jstasiak commented
•
edited by github-actionsbot
Loading
…ation
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).
I opted to fully replace the docstrings with the content from the documentation to save myself some work.
I think the news entry can be safely skipped here.
Note that the documentation is accurate assuming that #113179 gets merged and the 100.64.0.0/10
range handling is left unchanged.
I'll adapt the documentation as needed.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd prefer saying shared address space rather than (or in addition to) the numbers -- at least in the public docs.
Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: Petr Viktorin encukou@gmail.com
Co-authored-by: Petr Viktorin encukou@gmail.com
That's more than fair, all suggestions applied.
vstinner pushed a commit to vstinner/cpython that referenced this pull request
…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
adorilson pushed a commit to adorilson/cpython that referenced this pull request
…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
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request
…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
encukou added a commit to encukou/cpython that referenced this pull request
…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
encukou added a commit that referenced this pull request
…ges (GH-113179) (GH-113186) (GH-118177)
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] #61602
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
encukou added a commit to encukou/cpython that referenced this pull request
…s ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
encukou added a commit to encukou/cpython that referenced this pull request
…s ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
pablogsal pushed a commit that referenced this pull request
encukou added a commit to encukou/cpython that referenced this pull request
…s ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
encukou added a commit to encukou/cpython that referenced this pull request
…s ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at
ambv pushed a commit that referenced this pull request
…ges (GH-113179) (GH-113186) (GH-118177) (GH-118229)
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] #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
ambv pushed a commit that referenced this pull request
…es (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] #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
ambv pushed a commit that referenced this pull request
…es (GH-113179) (GH-113186) (GH-118177) (GH-118479)
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] #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
jstasiak deleted the improve-ipaddress-docs branch
For visibility: I created GH-119812 to handle the Shared Address Space (100.64.0.0/10
) exception documented here.
rickprice pushed a commit to ActiveState/cpython that referenced this pull request
…113179) (pythonGH-113186) (pythonGH-118177)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
Add IPv6 addresses to suspignore.csv
That's a lot of semicolons!
(cherry picked from commit e366724)
Add notable changes
rickprice pushed a commit to ActiveState/cpython that referenced this pull request
…113179) (pythonGH-113186) (pythonGH-118177)
- Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
Add IPv6 addresses to suspignore.csv
That's a lot of semicolons!
(cherry picked from commit e366724)
rickprice pushed a commit to ActiveState/cpython that referenced this pull request
…113179) (pythonGH-113186) (pythonGH-118177)
- Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
Add IPv6 addresses to suspignore.csv
That's a lot of semicolons!
(cherry picked from commit e366724)
rickprice pushed a commit to ActiveState/cpython that referenced this pull request
…113179) (pythonGH-113186) (pythonGH-118177)
- Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
pythongh-113171: pythongh-65056: Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177)
- pythonGH-113171: Fix "private" (non-global) IP address ranges (pythonGH-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.
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] python#61602
- pythonGH-65056: Improve the IP address' is_global/is_private documentation (pythonGH-113186)
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).
(cherry picked from commit 2a4cbf1) (cherry picked from commit 40d75c2)
(cherry picked from commit f86b17a)
Co-authored-by: Jakub Stasiak jakub@stasiak.at (cherry picked from commit 05a1467)
Add IPv6 addresses to suspignore.csv
That's a lot of semicolons!
(cherry picked from commit e366724)
frenzymadness pushed a commit to frenzymadness/cpython that referenced this pull request
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-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] python#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
frenzymadness pushed a commit to fedora-python/cpython that referenced this pull request
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-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] python#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
stratakis pushed a commit to stratakis/cpython that referenced this pull request
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-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] python#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").
2 participants