-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-37007: Implement socket.if_nametoindex() and socket.if_indextoname() on Windows #13522
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
bpo-37007: Implement socket.if_nametoindex() and socket.if_indextoname() on Windows #13522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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. |
Use "u" with Py_BuildValue().
…if_nametoindex-win
Hi, @zooba. Thanks for the review. I've updated the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
Thanks @ZackerySpytz! |
…_nameindex() on Windows (pythonGH-13522)
https://bugs.python.org/issue37007