Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-65056: Improve the IP address' is_global/is_private documentation#113186

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 6 commits intopython:mainfromjstasiak:improve-ipaddress-docs
Mar 18, 2024

Conversation

jstasiak
Copy link
Contributor

@jstasiakjstasiak commentedDec 15, 2023
edited by github-actionsbot
Loading

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.


📚 Documentation preview 📚:https://cpython-previews--113186.org.readthedocs.build/

…ationIt wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).I opted to fully replace the docstrings with the content from thedocumentation to save myself some work.
@jstasiak
Copy link
ContributorAuthor

I think the news entry can be safely skipped here.

Note that the documentation is accurate assuming that#113179 gets merged and the100.64.0.0/10 range handling is left unchanged.

I'll adapt the documentation as needed.

Copy link
Member

@encukouencukou left a comment

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 sayingshared address space rather than (or in addition to) the numbers -- at least in the public docs.

jstasiakand others added5 commitsMarch 14, 2024 00:00
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>
@jstasiak
Copy link
ContributorAuthor

That's more than fair, all suggestions applied.

@encukouencukou merged commit2a4cbf1 intopython:mainMar 18, 2024
vstinner pushed a commit to vstinner/cpython that referenced this pull requestMar 20, 2024
…ation (pythonGH-113186)*pythonGH-65056: Improve the IP address' is_global/is_private documentationIt wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).Co-authored-by: Petr Viktorin <encukou@gmail.com>
adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 25, 2024
…ation (pythonGH-113186)*pythonGH-65056: Improve the IP address' is_global/is_private documentationIt wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).Co-authored-by: Petr Viktorin <encukou@gmail.com>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…ation (pythonGH-113186)*pythonGH-65056: Improve the IP address' is_global/is_private documentationIt wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit to encukou/cpython that referenced this pull requestApr 23, 2024
…ation (pythonGH-113186)*pythonGH-65056: Improve the IP address' is_global/is_private documentationIt wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app
Copy link

GH-118177 is a backport of this pull request to the3.12 branch.

encukou added a commit that referenced this pull requestApr 24, 2024
…ges (GH-113179) (GH-113186) (GH-118177)*GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]#61602*GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)It wasn't clear what the semantics of is_global/is_private are and, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
encukou added a commit to encukou/cpython that referenced this pull requestApr 24, 2024
…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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
encukou added a commit to encukou/cpython that referenced this pull requestApr 24, 2024
…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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
encukou added a commit to encukou/cpython that referenced this pull requestMay 1, 2024
…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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
encukou added a commit to encukou/cpython that referenced this pull requestMay 1, 2024
…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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
ambv pushed a commit that referenced this pull requestMay 7, 2024
…ges (GH-113179) (GH-113186) (GH-118177) (GH-118229)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.255.255.255/32 ("Limited broadcast").---------Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
ambv pushed a commit that referenced this pull requestMay 7, 2024
…es (GH-113179) (GH-113186) (GH-118177) (GH-118472)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.255.255.255/32 ("Limited broadcast").---------Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
ambv pushed a commit that referenced this pull requestMay 7, 2024
…es (GH-113179) (GH-113186) (GH-118177) (GH-118479)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.255.255.255/32 ("Limited broadcast").---------Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
@jstasiakjstasiak deleted the improve-ipaddress-docs branchMay 30, 2024 22:43
@jstasiak
Copy link
ContributorAuthor

For visibility: I createdGH-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 requestJul 3, 2024
…113179) (pythonGH-113186) (pythonGH-118177)(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)Add IPv6 addresses to suspignore.csvThat's a lot of semicolons!(cherry picked from commite366724)Add notable changes
rickprice pushed a commit to ActiveState/cpython that referenced this pull requestJul 4, 2024
…113179) (pythonGH-113186) (pythonGH-118177)* Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186)(pythonGH-118177)(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)Add IPv6 addresses to suspignore.csvThat's a lot of semicolons!(cherry picked from commite366724)
rickprice pushed a commit to ActiveState/cpython that referenced this pull requestJul 8, 2024
…113179) (pythonGH-113186) (pythonGH-118177)* Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186)(pythonGH-118177)(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)Add IPv6 addresses to suspignore.csvThat's a lot of semicolons!(cherry picked from commite366724)
rickprice pushed a commit to ActiveState/cpython that referenced this pull requestJul 12, 2024
…113179) (pythonGH-113186) (pythonGH-118177)* Fix "private" (non-global) IP address ranges (pythonGH-113179) (pythonGH-113186)(pythonGH-118177)(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)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_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks 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, whenone gets to the bottom of it, it's not quite so simple (hence theexceptions listed).(cherry picked from commit2a4cbf1)(cherry picked from commit40d75c2)---------(cherry picked from commitf86b17a)Co-authored-by: Jakub Stasiak <jakub@stasiak.at>(cherry picked from commit05a1467)Add IPv6 addresses to suspignore.csvThat's a lot of semicolons!(cherry picked from commite366724)
frenzymadness pushed a commit to frenzymadness/cpython that referenced this pull requestAug 13, 2024
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-118472)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]python#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.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 requestAug 15, 2024
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-118472)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]python#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.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 requestAug 15, 2024
… address ranges (pythonGH-113179) (pythonGH-113186) (pythonGH-118177) (pythonGH-118472)The _private_networks variables, used by various is_privateimplementations, were missing some ranges and at the same time hadoverly strict ranges (where there are more specific ranges consideredglobally reachable by the IANA registries).This patch updates the ranges with what was missing or otherwiseincorrect.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, 121networks for IPv6.[1]python#61602In 3.10 and below, is_private checks whether the network and broadcastaddress are both private.In later versions (where the test wss backported from), it checkswhether 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 in255.255.255.255/32 ("Limited broadcast").
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@encukouencukouencukou left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jstasiak@encukou

[8]ページ先頭

©2009-2025 Movatter.jp