Skip to content

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

Merged
merged 5 commits into from
May 29, 2019

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented May 23, 2019

@ZackerySpytz ZackerySpytz requested a review from a team as a code owner May 23, 2019 10:23
@ZackerySpytz ZackerySpytz changed the title Implement socket.if_nametoindex() and socket.if_indextoname() on Windows bpo-37007: Implement socket.if_nametoindex() and socket.if_indextoname() on Windows May 23, 2019
Copy link
Member

@zooba zooba left a 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.
@ZackerySpytz
Copy link
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.

@ZackerySpytz
Copy link
Contributor Author

Hi, @zooba. Thanks for the review. I've updated the PR.

Copy link
Member

@zooba zooba left a 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>
@zooba zooba merged commit 8f96c9f into python:master May 29, 2019
@zooba
Copy link
Member

zooba commented May 29, 2019

Thanks @ZackerySpytz!

DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants