Update to the latest version from CPython 3.8#60
Open
frenzymadness wants to merge 8 commits intophihag:masterfrom
Open
Update to the latest version from CPython 3.8#60frenzymadness wants to merge 8 commits intophihag:masterfrom
frenzymadness wants to merge 8 commits intophihag:masterfrom
Conversation
…GH-6016) The result of host() was not empty when the network is constructed by a tuple containing an integer mask and only 1 bit left for addresses.
Stop rejecting IPv4 octets with leading zeroes as ambiguously octal. Plenty of other tools generate decimal IPv4 octets with leading zeroes, so keeping this check hurts interoperability. Patch by Joel Croteau.
IPv4Interface and IPv6Interface did not has netmask and hostmask attributes when its argument is bytes or int. This commit extracts method for constructors of Network and Interface, and ensure Interface class always provides them.
make a compare in bit-operation manner.
The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation Fixes: phihag#55
|
@phihag Can you merge this PR? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've managed to update this module to the version we currently have in CPython 3.8. The fix for #55 proposed in #56 is also included.
As I explained in #59, some changes might be a little bit backward-incompatible but not in a sense of compatibility with older Pythons but some parts just get deleted in CPython. I haven't seen anything important.
I had to do some small details in different ways or skip a commit or a part of it, here are some notes from the process:
self.hostmaskis still an attribute and not cached property because the same reason as aboveAll tests are okay locally (in Docker containers) so they should be okay also in the CI. Reviews and tests appreciated.