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
Improvements to ipaddress module #72047
Comments
This patch fixes the following minor issues with the ipaddress module:
It also refactors the constructors of IPv4Network, IPv4Interface, IPv6Network, and IPv6Interface. Additionally they now also accept a bytes or an IPv4/6Address object representing a netmask (or a hostmask [only IPv4]) as second element of an address/netmask tuple. This makes it easier to work with C-APIs that provide netmasks only as bytes object. This patch does not try to solve bpo-27683. |
Any updates? |
Peter, are you able to take a look at this or indicate you're happy for someone else to take it? (I relinquished my co-maintainer role for the ipaddress module a while back, so you're the only currently listed maintainer) |
@MoritzS Would you create a pull request on GitHub? |
I am not owner of ipaddress module, so I don't know we should On the other hand, IPv4Interface and IPv6Interface expose These attributes are not documented. I assume it was added But there are test for these attributes. cpython/Lib/test/test_ipaddress.py Lines 422 to 440 in 3c7931e
For safety, I added these attributes always, instead of remove them. PR-12836 is fixing it, and extracts methods for Network/Interface constructor |
I merged all cleanups. I don't merge accepting any IP representations as mask, because I'm not expert of this module. |
Because I treats this is just a code cleanup.
I didn't thought it was a bug.
Because I thought there are no change about public (documented) behavior.
NEWS entry is not needed for code cleanup. |
I for one have encountered bpo-35990 in my work and would appreciate a backport. |
OK, I thought I improved only undocumented behavior, but it was documented and previous behavior didn't follow the document. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: