bpo-37007: Implement socket.if_nametoindex() and socket.if_indextoname() on Windows#13522
Merged
zooba merged 5 commits intoMay 29, 2019
Merged
Conversation
zooba
approved these changes
May 23, 2019
Member
zooba
left a comment
There was a problem hiding this comment.
Approved, but I asked on bpo whether it's worth doing if_nameindex as well.
testInterfaceNameIndex() in test_socket.py is now run on Windows (as hasattr(socket, 'if_nameindex') is now True). Two other tests that aren't directly related to if_nameindex() have been disabled on Windows. These tests only use if_nameindex() for the purpose of picking a random network interface.
Contributor
Author
|
socket.if_nameindex() is now implemented on Windows. testInterfaceNameIndex() in test_socket.py is now run on Windows (as hasattr(socket, 'if_nameindex') is now True). Two other tests that aren't directly related to if_nameindex() have been disabled on Windows. These tests only use if_nameindex() for the purpose of picking a random network interface. |
zooba
reviewed
May 29, 2019
Use "u" with Py_BuildValue().
…if_nametoindex-win
Contributor
Author
|
Hi, @zooba. Thanks for the review. I've updated the PR. |
zooba
reviewed
May 29, 2019
Member
zooba
left a comment
There was a problem hiding this comment.
Just a suggested comment to avoid me having to look up the APIs again next time I read this :)
Co-Authored-By: Steve Dower <steve.dower@microsoft.com>
Member
|
Thanks @ZackerySpytz! |
DinoV
pushed a commit
to DinoV/cpython
that referenced
this pull request
Jan 14, 2020
…_nameindex() on Windows (pythonGH-13522)
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.
https://bugs.python.org/issue37007