-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-111442: Correct names for all 0's and all 1's hosts in Address objects, and deprecate incorrect names. #132421
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
Open
davidgroves
wants to merge
21
commits into
python:main
Choose a base branch
from
davidgroves:fix-issue-111442
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1be8d7f
Renamed broadcast_address to more generic last_address. Removed tests…
aa6e33f
Added news and ACK
39e4d86
Updated docs to remove broadcast_address from IPv6Network and add
5995cad
Updated docs
f8d797f
Docs updated on first and last addresses
c48a496
Moved first_address and last_address to correct classes, and added ne…
d4bdcbc
Fixes
b7dae66
Run Pre-commit
83529ad
lint / format
d5663b9
attr readded to network_address
davidgroves 7a513e8
attr readded for broadcast_address
davidgroves 1728d24
attr added to subnet_router_anycast_address
davidgroves c6c00eb
Docs cleanup.
davidgroves b59930f
Update Doc/library/ipaddress.rst
davidgroves f0d74ab
Merge branch 'main' into fix-issue-111442
davidgroves 27f6fc0
Added back tests for network_address and broadcast_address on IPv6, a…
8a468af
Added specific tests for first_address and last_address for IPv4Networks
0caa433
Readded docs on deprecated network_address/broadcast_address for IPv6…
353b5b4
Added None as return value for IPv6Network /127 and /128
bd5770c
Renamed tests to match naming convention
fed9e9e
Added /127 and /128 tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -548,14 +548,24 @@ dictionaries. | |
| These attributes are true for the network as a whole if they are true | ||
| for both the network address and the broadcast address. | ||
|
|
||
| .. attribute:: first_address | ||
|
|
||
| The first address in the network, the one with all the host bits cleared. | ||
| This is the same as the network_address for IPv4 networks. | ||
|
|
||
| .. attribute:: network_address | ||
|
|
||
| The network address for the network. The network address and the | ||
| prefix length together uniquely define a network. | ||
|
|
||
| .. attribute:: last_address | ||
|
|
||
| The last address in the network, the address with all the host bits set. | ||
| This is the same as the broadcast_address for IPv4 networks. | ||
davidgroves marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. attribute:: broadcast_address | ||
|
|
||
| The broadcast address for the network. Packets sent to the broadcast | ||
| The same as :attr:`last_address` for IPv4 networks. Packets sent to this | ||
| address should be received by every host on the network. | ||
|
|
||
| .. attribute:: hostmask | ||
|
|
@@ -756,8 +766,21 @@ dictionaries. | |
| .. attribute:: is_reserved | ||
| .. attribute:: is_loopback | ||
| .. attribute:: is_link_local | ||
| .. attribute:: network_address | ||
| .. attribute:: broadcast_address | ||
|
Comment on lines
-759
to
-760
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These shouldn't be removed quite yet - they'd need be documented during a deprecation period. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Readded |
||
| .. attribute:: first_address | ||
|
|
||
| The first address in the network, the one with all the host bits cleared. | ||
| This is the same as the subnet_router_anycast_address for IPv6 networks. | ||
davidgroves marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. attribute:: subnet_router_anycast_address | ||
|
|
||
| The Subnet-Router anycast address for the network, which is the first address | ||
| in the network. | ||
davidgroves marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| .. attribute:: last_address | ||
|
|
||
| The last address in the network, the one with all the host bits set. | ||
| This has no special meaning for IPv6 networks. | ||
davidgroves marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. attribute:: hostmask | ||
| .. attribute:: netmask | ||
| .. attribute:: with_prefixlen | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.