Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stdlib/_socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ if sys.platform != "win32":
def socketpair(__family: int = ..., __type: int = ..., __proto: int = ...) -> tuple[socket, socket]: ...

# Windows added these in 3.8, but didn't have them before
if sys.platform != "win32" or sys.version_info >= (3, 8):
# (and PyPy never has these)
if (sys.platform != "win32" or sys.version_info >= (3, 8)) and sys.implementation.name != "pypy":
def if_nameindex() -> list[tuple[int, str]]: ...
def if_nametoindex(__name: str) -> int: ...
def if_indextoname(__index: int) -> str: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ if sys.platform != "win32":
IPV6_USE_MIN_MTU as IPV6_USE_MIN_MTU,
)

if sys.platform != "win32" or sys.version_info >= (3, 8):
if (sys.platform != "win32" or sys.version_info >= (3, 8)) and sys.implementation.name != "pypy":
from _socket import if_indextoname as if_indextoname, if_nameindex as if_nameindex, if_nametoindex as if_nametoindex

if sys.platform != "darwin":
Expand Down